CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 7779

CAD tip CAD tip # 5362:

   
Question CAD 
 %  platform  category 
Q - question

How to switch current AutoCAD profile programmatically?

A - answer To switch to a different AutoCAD profile from a macro, script or a user application, you can use the command:
_VBASTMT
ThisDrawing.Application.Preferences.Profiles.ActiveProfile = "PROFILENAME"
Alternatively you can use a VisualLISP function:
(defun SetProfile (profilename)
 (vl-load-com)
 (vla-put-ActiveProfile
  (vla-get-Profiles
   (vla-get-Preferences
    (vlax-get-acad-object)
   )
  )
  profilename
 )
)
You may also make use of the Workspace functionality.
ACAD
100% *  CAD 
15.1.2007    13540×  
Prices - CAD eShop:
applies to: AutoCAD ·

See also:
Tip 13802:Dual-color hatches in AutoCAD.
Tip 13683:Limitations of the LISP language (AutoLISP, VisualLISP) in AutoCAD LT - what to watch out for
Tip 13675:Two PURGE commands in Autodesk Civil 3D.
Tip 13635:How to speed up background publishing in AutoCAD?
Tip 13305:Where can I find the icon to run Civil 3D 2023 as AutoCAD?


Back   All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   



Featuring:
Use Google Earth images in your AutoCAD projects with the Plex.Earth Tools More info


Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist