load profiles

Discussion in 'AutoCAD' started by Ghysboy, Feb 13, 2004.

  1. Ghysboy

    Ghysboy Guest

    Hi all,
    Iwant to create script to load a profiles. But I don't know the way to open
    the option dialog box at the command line...
    I'm sure if have variable like cmddia or filedia 0 or 1 but i don't know
    what is it

    Thanks a lot
     
    Ghysboy, Feb 13, 2004
    #1
  2. Ghysboy

    hensley Guest

    The only system variable I know of is CPROFILE which lists the current profile and is read-only. In VBA there are several methods to work with profiles such as CopyProfile, DeleteProfile, ImportProfile etc. You would have to create a VBA program that does what you want then load it with the script.
     
    hensley, Feb 13, 2004
    #2
  3. Ghysboy

    apc Guest

    Instead of using the /b switch to specify a script at startup have you thought of using a /p for a user-defined profile??

    ie: "C:\Program Files\AutoCAD 2004\acad.exe" /p yourprofile
     
    apc, Feb 13, 2004
    #3
  4. Ghysboy

    Murph Guest

    Here's a simple toggle to switch profiles I did a while back

    ;toggle profiles
    (defun p_toggle ( / rg_acad rg_pref rg_prof )
    (setq rg_acad (vlax-get-acad-object)) ;gets the Acad application
    (setq rg_pref (vla-get-Preferences rg_acad)) ;gets the preferances
    (setq rg_prof (vla-get-profiles rg_pref)) ;gets the profiles
    (if (= (Vlax-get-property rg_prof 'ActiveProfile)"Test") ;If active
    profile is named Test
    (vlax-put-property rg_prof 'ActiveProfile "Murph") ;sets active
    profile to Murph
    (vlax-put-property rg_prof 'ActiveProfile "Test") ; else sets Test
    active
    )
    )

    To open the Options dialog the command is Options. To show the dialogs set
    cmddia = 1

    Murph
     
    Murph, Feb 13, 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.