.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

clear or unload profile

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
378 Views, 3 Replies

clear or unload profile

Is there any way that I can clear or unload the current profile by using ActiveDocument.SendCommand
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

What would you type at the commandline to achieve it?
Message 3 of 4
Anonymous
in reply to: Anonymous

yes, that's exactly what I want to know i.e. what do i need to type on commandline to unload current profile
Message 4 of 4
arcticad
in reply to: Anonymous

What you are asking doesn't make any sense.

You wouldn't use the command line to do this anyways.

{code}
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.ApplicationServices

Public Class Profile

Public Sub DeleteCurrentProfile()

Dim acadApp As AcadApplication = CType(Application.AcadApplication, AcadApplication)

'Get the Current Profile
'You can not Delete the Current Profile
Dim cProfile As String = acadApp.Preferences.Profiles.ActiveProfile
Dim nProfile As String = "Backup"

' Create a copy of the current profile
acadApp.Preferences.Profiles.CopyProfile(cProfile, nProfile)
' Set New Profile Active
acadApp.Preferences.Profiles.ActiveProfile = nProfile
' Delete old Profile
acadApp.Preferences.Profiles.DeleteProfile(cProfile)

' You can also just reset the current profile
acadApp.Preferences.Profiles.ResetProfile(cProfile)


End Sub
End Class

{code}
---------------------------



(defun botsbuildbots() (botsbuildbots))

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost