Author Topic: Export the current profile automatically?  (Read 2236 times)

0 Members and 1 Guest are viewing this topic.

KewlToyZ

  • Guest
Export the current profile automatically?
« on: January 24, 2007, 01:47:36 PM »
I want to automate the users profile to export into a predefined directory and title.
I'm not hving any luck with the vba i found in the help files?

KewlToyZ

  • Guest
Re: Export the current profile automatically?
« Reply #1 on: January 24, 2007, 02:12:00 PM »
my problem with the vba sample is I can't figure out how to path the directory where I save it to.

KewlToyZ

  • Guest
Re: Export the current profile automatically?
« Reply #2 on: January 24, 2007, 02:32:55 PM »
Sub Example_ExportProfile()
    ' This example exports the active profile to a new name.
   
    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 ActiveProfile is: " & preferences.Profiles.ActiveProfile, , "ExportProfile Example"
   
    ' Export the active profile
    preferences.Profiles.ExportProfile currActiveProfile, "2007-KTA.arg"
    MsgBox "The ActiveProfile has been exported to: 2007-KTA.arg", , "ExportProfile Example"
   
End Sub



as near as I can figure it places in the drawing file directory from Set preferences = ThisDrawing.Application.preferences  ?

KewlToyZ

  • Guest
Re: Export the current profile automatically?
« Reply #3 on: April 09, 2007, 10:15:39 AM »
Se7en had the easiest solution here:
http://www.theswamp.org/index.php?topic=14917.0