creating DIM styles with lisp

Martin (archive)

Usenet Archive
Joined
Aug 1, 2000
Messages
245
Reaction score
0
i'm looking for a way to create Dim styles in lisp, i have done that for text styles, but with (-style) you have the option to fill all the variables for the new text-style, but that option is not in (-dimstyle) and there is no special file for DIM-styles like those in linetype files (.lin). you can get all specifications of a Dim style with (-dimstyle/status) but how to put these into a new style or updating existing ones? the exprsstools have a dialog version for that but no command line version.
martin
 
You could set the desired variables as needed (i.e.: DIMSCALE, DIMASO, etc), then run (command "._dimstyle" "_s" "myname")

If you do this in a drawing where "myname" is already defined, you will get a prompt to overwrite. To avoid this, set EXPERT to 5 before trying to save the dimstyle.
 
martin
might not be the answer you need but I use a script file in conjunction with a small lisp that sets dimscale, ltscale and a text style for dimensions and then runs a script to set all of my other dim vars. All the user needs to do is enter the desired scale factor and the rest is taken care of. Here's a part of it:
CMDECHO
0
DIM
DIMADEC
4
DIMALT
OFF
DIMALTD
2
DIMALTF
1.00
DIMALTRND
0.00
DIMALTTD
2
etc

HTH
Richard
 
You can use visual lisp or entmake to create the dimstyle, but be aware that certain dimstyle values must be accessed via the object id.

Examples are provided in the documentation for VB, but can be accessed via the VL-functions.
 
I take a little different approach:

All my standards; layers, textstyles, dimstyles, and ADT styles are saved in a drawing located on the server. I then use ObjectDBX to "import" the styles as neccessary. This allows me to use AutoCAD's resident tools to modify and manage said standards. Works great!

jb
 

Latest threads

Back
Top