Jump to content
Ahankhah

Needed extracting and changing settings of OPTIONS dialog via AutoLISP

Recommended Posts

Ahankhah

Does any way exist to find out all settings in Files Tab of Options via AutoLISP, then change them to desired values?

Share this post


Link to post
Share on other sites
pBe
Does any way exist to find out all settings in Files Tab of Options via AutoLISP, then change them to desired values?

 

Getenv

Setenv

 

or

 

(vla-get-files (vla-get-preferences (vlax-get-acad-object)))

 

See attached:

 

AutoCAD Environment Variable Quick Guide.pdf

Share this post


Link to post
Share on other sites
Ahankhah

pBe,

thank you for your reply.

 

Getenv

Setenv

I don't know how to use getenv and setenv, i.e. I have no knowledge about the name of the variables.

 

(vla-get-files (vla-get-preferences (vlax-get-acad-object)))

The code is very good to get environment variables, so thank you for the help, but how to set variables?

Share this post


Link to post
Share on other sites
Guest kruuger

few sample:

(setq *files*
 (vla-get-files
   (vla-get-preferences (vlax-get-acad-object))
 )
)

(vla-get-TempDirectory *files*)
(vla-put-TempDirectory *files* "C:\\Temp\\")

(vla-get-PrinterConfigPath *files*)
(vla-put-PrinterConfigPath *files* "\\\\ahi\\support\\CAD_Install\\LD6\ahi\\PLOTTERS")

ok ?

kruuger

Share this post


Link to post
Share on other sites
pBe

updated the post, attached pdf for SETENV/GETENV rererence for you

 

as for vl

 

IAcadPreferencesFiles: This object contains the options from the Files tab on the Options dialog

Property values:

AltFontFile =

AltTabletMenuFile =

Application (RO) = #

AutoSavePath =

ColorBookPath =

ConfigFile (RO) =

CustomDictionary =

CustomIconPath =

DefaultInternetURL =

DriversPath =

EnterpriseMenuFile =

FontFileMap =

HelpFilePath =

LogFilePath =

MainDictionary =

MenuFile =

PageSetupOverridesTemplateFile =

PlotLogFilePath =

PostScriptPrologFile =

PrinterConfigPath =

PrinterDescPath =

PrinterStyleSheetPath =

PrintFile =

PrintSpoolerPath =

PrintSpoolExecutable =

QNewTemplateFile =

SupportPath =

TempFilePath =

TemplateDwgPath =

TempXrefPath =

TextEditor =

TextureMapPath =

ToolPalettePath =

WorkspacePath =

Methods supported:

GetProjectFilePath (1)

SetProjectFilePath (2)

 

(vla-put-QNewTemplateFile VarName "NewValue")

where VarName is product of

 

(setq VarName (vla-get-files (vla-get-preferences (vlax-get-acad-object))))

 

to check if an object has a specified property

 

(vlax-property-available-p VarName 'DriversPath)

 

or

(setenv QnewTemplate "NewValue")

 

Setenv variable name is case sensitive so be careful with that

 

Hope this helps

Share this post


Link to post
Share on other sites
Ahankhah

pBe and Kruuger,

thanks for your help.

Share this post


Link to post
Share on other sites
BlackBox
Kruuger, thank you for your aim, but in my country the address is FILTERED:shock::cry::bloodshot::reallymad:.

 

That sucks.

Share this post


Link to post
Share on other sites
BIGAL

Just a suggestion when setting your paths you may want to use strcat and read existing paths and add your own then update paths this way you dont stuff up the generic Autocad ones.

 

Every body like me about to load 2012 this will help setups as we 13 to do.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...