This statement returns a variant array of string values containing a list of
the available profiles on the system:
Call
ThisDrawing.Application.Preferences.Profiles.GetAllProfileNames(myprofilenam
es)
This statement can set the active profile (where i is the array index):
ThisDrawing.Application.Preferences.Profiles.ActiveProfile =
myprofilenames(i)
Cheers,
Kenneth Hutson
San Antonio, Texas
"T Willmer" wrote in message
news:51AAC149482EE6C87CB99820476CE4D0@in.WebX.maYIadrTaRb...
> Does anyone know if it is possible to change the current profile setting
via
> VBA while in AutoCAD 2002?
>
> Basically, I have several profiles utilized for different purposes. I
would
> like the operator on startup to select the profile needed for that
session.
> Also, the ability to easily change profiles without going to
> Tools>Options... Profiles or having several desktop icons with the
different
> profile switches set.
>
> I am able to read all the profiles available from the registry, and place
> them in a list box, however simply writing a selected profile as new value
> to the Profiles (Default) registry key does not affect the current
session.
> The profile selected and written to the registry however is the default
the
> next time AutoCAD is started.
>
> Any ideas how this can be achieved????
>
> Thanks.
>
>