Create Dimension and Mleader style in LISP

Create Dimension and Mleader style in LISP

owitzki
Enthusiast Enthusiast
1,239 Views
2 Replies
Message 1 of 3

Create Dimension and Mleader style in LISP

owitzki
Enthusiast
Enthusiast

I just can't do it by myself too complicated for me!

 

Hi to all,

 

My goal is to create set of dimension and multi leaders style in autolisp as attached (sample set is 1:100 scale). If possible, created dimension and multileader will overwrite existing or current styles. By entering or typing the scale, the routine will create the set of styles. The styles are:

 

Dimension:

E_100mm                               - arrow head

E_100mm_Ellipse_Head     - ellipse head

 

Multileader:

E_100mm                               - arrow head

E_100mm_Ellipse_Head     - ellipse head

E_100mm_Detail-Tag          - arrow head with user block content

 

The 'user_ellipse' and 'Detail-Tag' blocks are stored in my c drive.

 

Below are some info for arrow size head.

Dimension:


(SETVAR "DIMASZ" 3) ;Arrow size
(SETVAR "DIMCEN" 2.5) ;Center mark size
(SETVAR "DIMEXE" 2) ;Extension above dimension line
(SETVAR "DIMEXO" 2) ;Extension line origin offset
(SETVAR "DIMGAP" 1.5) ;Gap from dimension line to text
(SETVAR "DIMDLI" 2) ;Dimension line spacing
(SETVAR "DIMTXSTY" "NOTE_SIMPLEX_WF0.9") ;Text style
(SETVAR "DIMFXL" 1.0000) ;Fixed Extension Line
(SETVAR "DIMADEC" 0) ;Angular decimal places
(SETVAR "DIMARCSYM" 0) ;Arc length symbol
(SETVAR "DIMATFIT" 3) ;Arrow and text fit
(SETVAR "DIMAUNIT" 1) ;Angular unit format
(SETVAR "DIMAZIN" 0) ;Angular zero supression
(SETVAR "DIMBLK" ".") ;Arrow block name
(SETVAR "DIMBLK1" ".") ;First arrow block name
(SETVAR "DIMBLK2" ".") ;Second arrow block name
(SETVAR "DIMCLRD" 256) ;Dimension line and leader color
(SETVAR "DIMCLRE" 256) ;Extension line color
(SETVAR "DIMCLRT" 256) ;Dimension text color
(SETVAR "DIMDEC" 0) ;Decimal places
(SETVAR "DIMDLE" 0.0000) ;Dimension line extension
(SETVAR "DIMFRAC" 0) ;Fraction format
(SETVAR "DIMFXLON" 0) ;Enable Fixed Extension Line ON/OFF (1/0)
(SETVAR "DIMJUST" 0) ;Justification of text on dimension line
(SETVAR "DIMLDRBLK" ".") ;Leader block name
(SETVAR "DIMLFAC" 1.0000) ;Linear unit scale factor
(SETVAR "DIMLUNIT" 2) ;Linear unit format
(SETVAR "DIMLWD" 2) ;Dimension line and leader lineweight
(SETVAR "DIMLWE" 25) ;Extension line lineweight
(SETVAR "DIMRND" 0.0000) ;Rounding value
(SETVAR "DIMTAD" 1) ;Place text above the dimension line
(SETVAR "DIMTDEC" 0) ;Tolerance decimal places
(SETVAR "DIMTFAC" 1.0000) ;Tolerance text height scaling factor
(SETVAR "DIMTFILL" 0) ;Text background enabled
(SETVAR "DIMTFILLCLR" 0) ;Text background color
(SETVAR "DIMTIH" 0) ;Text inside extensions is horizontal ON/OFF (1/0)
(SETVAR "DIMTIX" 0) ;Place text inside extensions ON/OFF (1/0)
(SETVAR "DIMTM" 0.0000) ;Minus tolerance
(SETVAR "DIMTMOVE" 2) ;Text movement

 

Multileader:

(CreateMLeaderStyle "E_100mm"
(list
'("ArrowSize" . 3)
'("DoglegLength" . 4)
'("LandingGap" . 1.25)
'("LeaderLineColor" . 0)
'("ScaleFactor" . 100)
'("TextAngleType" . 0)
'("TextColor" . 256)
'("TextHeight" . 2.5)
'("TextLeftAttachmentType" . 1)
'("TextRightAttachmentType" . 1)
'("TextStyle" . "NOTE_SIMPLEX_WF0.9")

 

Text Style:

NOTE_SIMPLEX                      : Simplex style, 1.0 width factor

NOTE_SIMPLEX_WF0.8         : Simplex style, 0.8 width factor

NOTE_SIMPLEX_WF0.9         : Simplex style, 0.9 width factor

 

Thank you,

0 Likes
1,240 Views
2 Replies
Replies (2)
Message 2 of 3

ronjonp
Advisor
Advisor

Create a template 🙂

0 Likes
Message 3 of 3

owitzki
Enthusiast
Enthusiast

Actually, I have those drawings/blocks in different scale (1:1, 1:2, 1:5, 1:10, 1:20, 1:25, 1:50 ...), so if I am working on 1:100 scale plan and I will make a 1:50 detail out of it in the same sheet, I would drag blocks with 1:50 dimension style and mleader from windows explorer or design center. The thing is some of my colleagues, what they do is modify the same dimensions/mleader style to fit in different scale. Now we have one style in 2 or 3 different scale. It will be nice if the tags have their own name and scale. 

0 Likes