Jump to content

Needed extracting and changing settings of OPTIONS dialog via AutoLISP


Ahankhah

Recommended Posts

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?

Link to comment
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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...