Controlling System Variables

General support questions regarding the use of DraftLogic Electrical that don't fit into any of the more specific forums.

Controlling System Variables

Postby forumadmin » Mon Nov 12, 2012 4:09 pm

DraftLogic Electrical needs certain system variables to be specific values. There are also some system variables that we set a certain way because it 'generally works best'...but these can be other values if you desire. In the case where DraftLogic Electrical is setting a certain AutoCAD system variable to a particular value and you desire it to be something else, first please contact us to ensure that the variable in question is one that won't harm DraftLogic Electrical's functioning by changing the value.

*** Making a bad change to even one AutoCAD system variable can drastically affect how your AutoCAD works, take caution in making changes.

How Can I See the System Variables?

In reality, there is an immense number of AutoCAD system variables & DraftLogic Electrical sets values on a very small portion of them.

To see the list of system variables, type SETVAR [enter] at the command line then type ? [enter]. Enter once again to select the default <*> see the whole list. The list is long, so you will need to press [enter] several times to see them all! Alternatively, if you have Express Tools installed, you may have the System Variable Editor available. Go to this menu item to launch it: Express > Tools > System Variable Editor.

Is DraftLogic Electrical or Something Else Running on my AutoCAD Affecting a Particular System Variable?

To determine if DraftLogic Electrical (or anything else you have loaded into AutoCAD) if affecting a particular variable, perform these quick and easy steps:
1. Launch AutoCAD with a new blank drawing or an existing drawing.
2. Type the name of the system variable you are interested in on the command line to check its current value. E.g. 'LTSCALE', which defaults to 1.0000.
3. Set it to a different value and take note of that value.
4. Type the name again to ensure that your change was committed, you should have the new value reported back to you now.
5. Save the drawing.
6. Shut down AutoCAD.
7. Restart AutoCAD and reload the drawing you had saved with the changed system variable setting in it.
8. Type the name of the system variable you are interested in on the command line to check its current value. If the value is as you set it in step 3, then anything that is loading with your AutoCAD (DraftLogic Electrical, for example) is not affecting that particular system variable on load. If the value has changed, that system variable is being set for a reason, contact us to discuss what you need a different value for. It may, however, set it when executing a particular function and not be returning it to your value, so periodically check the value as you work to see if some function is changing the value. Let us know if so & if it would be best to save the initial value and return to it after the operation in question is completed, we will adjust our code to do so.

Overriding a System Variable that is Being Set On Load

If we talk through your needs and determine that it would be OK to override a system variable that DraftLogic Electrical is setting, or to set one that won't affect DraftLogic Electrical, here is the process to do so. We'll be modifying the DL-Supplement.lsp file for sites where DraftLogic Electrical Client and Server are installed on the same workstation OR where there is a multiuser site where it is desired that all users have the same system variable change made. Where your site is multiuser and you desire only to affect your workstation with a system variable change, you can modify the ACADDOC.lsp (see 'Using the ACADDOC.lsp' at http://www.lee-mac.com/autoloading.html)

Here is an example of what to add to the bottom of DL-Supplement.lsp or into ACADDOC.lsp to modify the LTSCALE system variable to '1' and report such setting back to you in the command history window--in either case, just open with Notepad text editor to make and save your changes. Make a copy of the file as it sits before making modifications so you have an escape route back to normalcy if things go squirrelly on you! The DL-Supplement.lsp is located at: Program Files(x86)\DraftLogic Electrical\Server\DL-Supplement.lsp

(setvar "LTSCALE" 1)
(princ "\nCustom system variables set:")
(princ "\n\tLTSCALE: ")
(princ (getvar "LTSCALE"))

Note that DL-Supplement.lsp is one of the last things that DraftLogic Electrical loads but it is not the very last. So if you see '*Cancel*' after your system variable echoes a change to the command line, it is highly likely just a following task that echoed that...you can verify your system variable value once loading has completed by typing it on the command line.
forumadmin
Site Admin
 
Posts: 87
Joined: Fri Sep 11, 2009 5:46 am

Return to General Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron