Visual LISP, AutoLISP and General Customization

Reply
Mentor
coopdetat
Posts: 196
Registered: ‎03-25-2011
Message 1 of 1 (178 Views)

Settings Options using VLisp

178 Views, 0 Replies
02-15-2013 12:08 PM

I looked all over for how to set the default plot to file path and had not much success until I stumbled across this post:

http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/vla-get-defaultplottofilepath/m-p/215...

With this information I was able to set the default plot to file path in the options dialog using only VLisp.

(VLA-PUT-DEFAULTPLOTOTFILEPATH o_prefs <new path>) o_prefs is defined in code below. 

I'm still crawling along in my uncderstanding of the object model and how to get at it.  Everything seems very difficult because I have no good reference of the available functions and how to use them.  I know many of you will see what I am so excited to have discovered as elementary, and I know it is, but that's where I am and I suspect there must be others like me, so, for them, here it is:

I discovered something regarding the options dialog that I thought might help others as well.  It sure will help me.  (the following code is from the above linked original post, I've added some notes):

  ;;make sure vl- functions work
  (VL-LOAD-COM)
  ;;get the acad application
  (SETQ acad (VLAX-GET-ACAD-OBJECT))
  ;;get the application preferences,
  (SETQ prefs (VLA-GET-PREFERENCES acad))
  ;;
  ;;HERE IS WHAT I THOUGHT MIGHT HELP SOMEBODY
  ;;
  ;;prefs object has the following properties which provide
  ;;access to the tabs in the Options Dialog:
               ;   Application (RO) = #<VLA-OBJECT ...>
               ;   Display (RO) = #<VLA-OBJECT ...>
               ;   Drafting (RO) = #<VLA-OBJECT ...>
               ;   Files (RO) = #<VLA-OBJECT ...>
               ;   OpenSave (RO) = #<VLA-OBJECT ...>
               ;   Output (RO) = #<VLA-OBJECT ...>
               ;   Profiles (RO) = #<VLA-OBJECT ...>
               ;   Selection (RO) = #<VLA-OBJECT ...>
               ;   System (RO) = #<VLA-OBJECT ...>
               ;   User (RO) = #<VLA-OBJECT ...>
  ;;get at the preferences on any of the tabs using
  ;;(VLA-GET-<name> <object>)
  ;;for example:
  (SETQ o_prefs (VLA-GET-OUTPUT prefs))
  ;;HTH someone

 

---------------------------------------------Signature--------------------------------------------
Civil Design Professional Since 1983 (Intergraph), AutoCAD since 1989
Windows 7 Professional 64-bit - Service Pack 1
Intel﴾R﴿ Core﴾TM﴿ i7-3820 CPU 3.60GHz; 16 GB DDR3 Dual Channel RAM
nVidia Quadro 4000; AutoCAD Civil 3D 2014, sp1

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community