Profiles

Discussion in 'AutoCAD' started by David, Sep 9, 2004.

  1. David

    David Guest

    Hi NG;

    I have two different profiles.
    How do I switch between them through VBA.

    TIA David H
     
    David, Sep 9, 2004
    #1
  2. David

    Kevin Terry Guest

    Sub Example_ActiveProfile()
    ' This example returns the current setting of
    ' ActiveProfile.

    Dim preferences As AcadPreferences
    Dim currActiveProfile As String

    Set preferences = ThisDrawing.Application.preferences

    ' Retrieve the current ActiveProfile value
    currActiveProfile = preferences.Profiles.ActiveProfile
    MsgBox "The current value for ActiveProfile is " & currActiveProfile,
    vbInformation, "ActiveProfile Example"
    End Substraight from the help file...
    Kevin
     
    Kevin Terry, Sep 9, 2004
    #2
  3. David

    David Guest

    Hi Kevin;

    I think you missunderstood my question.
    I have two profiles P1 and P2.
    My current profile is P1 and I want
    to switch to P2 (P2 set to current) through VBA.

    How do I accomplish?
     
    David, Sep 10, 2004
    #3
  4. David

    David Guest

    Nevermind.
    Found the solution.

    I used this (that doesn't work)
    Application.Preferences.Profiles.ActiveProfile = "P2"
    instead of this (that works)
    ThisDrawing.Application.Preferences.Profiles.ActiveProfile = "P2"

    Thanks for taking your time.
     
    David, Sep 10, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.