TheSwamp

Code Red => .NET => Topic started by: jtoverka on September 30, 2020, 07:59:43 AM

Title: System Variable Dialog Box
Post by: jtoverka on September 30, 2020, 07:59:43 AM
So I would like to know where the data in the System Variables dialog box comes from (command line: SYSVDLG).

I am looking to create a dialog box identical to this with additional features. I have a lisp function that is loaded every time a drawing is loaded to set drawing variables to my preferences. Variables like the AUNITS and AUPREC. I would like to create a .NET implementation instead.
Title: Re: System Variable Dialog Box
Post by: Jeff H on September 30, 2020, 09:30:58 AM
If it is saved in drawing(per drawing variable) it is usually a property of the Database object and if "system" variable(saved in registry) then Application.Get/SetSystemVariable
Title: Re: System Variable Dialog Box
Post by: jtoverka on September 30, 2020, 09:41:00 AM
If it is saved in drawing(per drawing variable) it is usually a property of the Database object and if "system" variable(saved in registry) then Application.Get/SetSystemVariable

But where do I find the descriptions for these variables as shown in the picture? I would like to replicate what is shown.
Title: Re: System Variable Dialog Box
Post by: Jeff H on September 30, 2020, 09:45:46 AM
But where do I find the descriptions for these variables as shown in the picture? I would like to replicate what is shown.
Only source I know is help file.
Title: Re: System Variable Dialog Box
Post by: dgorsman on September 30, 2020, 02:38:35 PM
If it is saved in drawing(per drawing variable) it is usually a property of the Database object and if "system" variable(saved in registry) then Application.Get/SetSystemVariable

But where do I find the descriptions for these variables as shown in the picture? I would like to replicate what is shown.

I think there's a data file for names (wouldn't put it past being hard-coded though).  I seem to remember the dialog being out of date as it was noted as missing several new sysvars.

If you're making your own though, it shouldn't matter.  Build it using what you know (or as something to help you learn a new method) and to suit your own needs - CFG/INI, XML, SQLite, Access, Excel, XHTML/online service... Pick one and run with it!
Title: Re: System Variable Dialog Box
Post by: BIGAL on September 30, 2020, 08:10:57 PM
"set drawing variables to my preferences"

Why not just set them to what you want why do you need a dcl ?

You can create various functions to suit that have different system settings.
Title: Re: System Variable Dialog Box
Post by: jtoverka on September 30, 2020, 08:27:55 PM
"set drawing variables to my preferences"

Why not just set them to what you want why do you need a dcl ?

You can create various functions to suit that have different system settings.

I already have an implementation in AutoLISP. It's not graphical, just some setvars. I am talking about drawing stored system variables. Not all drawings have the same settings and it's really annoying. Like I will open a drawing that has a different clayer, celtype, celweight and it gets in my way when I create objects. I want to see all possible variables, their description, and whether or not to set a default preference when I open a drawing.

This is especially true when aunits and auprec is not what I want. I HATE architectural units with a passion. I want decimals to 8 places. Again, I have an implementation in AutoLISP. I just want a really good implementation in .NET.
Title: Re: System Variable Dialog Box
Post by: jtoverka on October 01, 2020, 08:43:20 AM
I did some digging, I found it. I have AutoCAD Electrical 2018 with Express Tools installed.

Data file: C:\Program Files\Autodesk\AutoCAD 2018\Express\sysvdlg.dat
Program: C:\Program Files\Autodesk\AutoCAD 2018\Express\sysvdlg.arx
Title: Re: System Variable Dialog Box
Post by: twdotson on October 01, 2020, 09:07:12 AM
How about the SystemVariableEnumerator ?

https://adndevblog.typepad.com/autocad/2014/03/systemvariableenumerator-new-class-in-autocad-2015.html