0% found this document useful (0 votes)
30 views33 pages

Drawing Command Guide - 2020

The document describes the commands and parameters used to generate 2D technical drawings using a scripting language. It includes commands to create basic shapes like lines, rectangles, arcs and circles, as well as more complex objects like polylines, images, dimensions, text and hatching. Parameters specify properties for each object such as position, size, style and layer information. Repeating blocks of objects and dynamic positioning of elements relative to other objects can be defined.

Uploaded by

Lim Wee Beng
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views33 pages

Drawing Command Guide - 2020

The document describes the commands and parameters used to generate 2D technical drawings using a scripting language. It includes commands to create basic shapes like lines, rectangles, arcs and circles, as well as more complex objects like polylines, images, dimensions, text and hatching. Parameters specify properties for each object such as position, size, style and layer information. Repeating blocks of objects and dynamic positioning of elements relative to other objects can be defined.

Uploaded by

Lim Wee Beng
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 33

2 DCOMMANDS

BLOCK Block Name Ratio X Ratio Y X Y


BLOCK_OBJ Start Row End Row Block Name Ratio X Ratio Y
RECT X Y Width Height Thickness
LINE X1 Y1 X2 Y2 Thickness
ARC Center X Center Y Radius Start Angle End Angle
CIRCLE Center X Center Y Radius Thickness Line Style
POLYLINE X1,Y1,X2,Y2,… Thickness Line Style Color LineTypeScale
LEADER X1,Y1,X2,Y2,… Thickness Line Style Color Arrow Size
IMAGE file name X Y Scale
DIM_ROTATE X1 Y1 X2 Y2 Pos X
DIM X1 Y1 X2 Y2 Pos X
** DIMTAG tag name value
DIM_DIA X1 Y1 X2 Y2 Pos X
X1 Y1 X2 Y2 X3
REPEAT Start Row End Row Origin X Origin Y Offset X
REPEAT_ABS Start Row End Row Count Current Count
** REPEAT_BLK Start Row End Row Count Current Count Origin X
** REPEAT_ALL Start Row End Row Count Current Count
** FINDOBJ tag name Object Row X Y
MOVEOBJ Object Row X Y
MOVEGRP Start Row End Row From X From Y To X
REMOVEOBJ Object Row tag name
REMOVE Object Row
BOUNDARY left right top bottom
BOUNDARY_OBJ Object Row left right top bottom
** BOUNDARY_XY From X From Y left right top
BOUNDARY_TAG Object Row tag name left right top
TEXT X Y Size Hor Align Vert Align
MTEXT X Y Size Hor Align Vert Align
** XPROP Object Row Prop Name Prop Value
RATIO Object Row Ratio X Ratio Y
MIRROR Start Row End Row Start X Start Y End X
** HATCH Object Row Hatch Style Angle Scale Fill Color
DIM_ORDINATE X1 Y1 X2 Y2 X/Y Bend 1
OBLONG X Y Width Height Rotation
REC_ARRAY Start Row End Row Row Count Column Count Row Distance

COORDINATES
LASTX Last object's X location + object's width
LASTY Last object's Y location + object's height
Object's X location
LASTX(ROW)
+ object's width, refer to object created at row A in script table
Object's Y location
LASTY(ROW)
+ object's width, refer to object created at row A in script table
Object location, offset according to object A + width ( if X) or height ( if Y )for an amount of B
OFFSET(A,B)

LINE STYLE
0 Invisible
1 Solid
2 Dotted Line
3 Hidden2

COLOR
Need to change the cell backcolor to indicate the actual color, cannot type in text.

DIMENSION
DIM Horizontal/Vertical Dimension
Pos X/Pos Y Coordinate for the dimension text position
String In case need to perform text replacement, else leave it blank
A Rotation
B Decimal
C Text Height, A = Auto
D Arrow Size, A = Auto
E Text Distance, A = Auto
F Dimension Point Offset X, A = Auto
G Dimension Point Offset Y, A = Auto
H Text Vertical Adjustment, 0 = Center, 1 = Above
I Text Horizontal Rotation, 0 = Aligned, 1 = Horizontal
J Text Movement, 0 = Keep Dim line with text, 1 - Move with Leader, 2 - Move without Leader
K User Default Text Position, 0 = Yes, 1 = No
TEXT POS X/TEXT POText position especially when K = 1
Object Row Row of drawing object in drawing script to be linked with
Color Color of the dimension

DIMTAG
Tag Name Search for dimension object with this tag name
Value Leave it blank if to take default

REPEAT
Start Row Starting of script row
End Row Ending of script row
Origin X Starting of block insertion X
Origin Y Starting of block insertion Y
Offset X X Distance between Block
Offset Y Y Distance between Block
Count Number of blocks
Max Width 0 = To force to use Count value above, else adjust number of block to fit into this maximum width
Max Height 0 = To force to use Count value above, else adjust number of block to fit into this maximum height
Centralized X = Centralized X, Y = Centralized Y, XY = Centralized XY
FINDOBJ To find an object absolute location within a block even when it is resized
X Return X value of the object with TAG = tag name within a block relatively
Y Return Y value of the object with TAG = tag name within a block relatively

MOVEOBJ To move an object relatively within a block

TEXT
X X location of the text object, affected by horizontal alignment
Y Y location of the text object, affected by vertical alignment
Size Height of text in points
Hor Align 0 = Left, 1 = Right, 2 = Center, 3 = Horizontal Aligned, 4 = Fit
Vert Align 0 = Top, 1 = Bottom, 2 = Baseline, 3 = Center
Rotation in Degree
Width Factor Horizontal scale, default = 1
Bold 0 = None, 1 = Bold
Underline 0 = None, 1 = Underline, 2 = Overline, 3 = Under and Over, 4 = Center Line, 5 = Under and Center, 6

BOUNDARY_OBJ In repetative plotting (REPEAT, REPEAT_ABS), the Object Row will be the same for each loop, theref
BOUNDARY_TAG Can only be used for BLOCK object

TEXT
file name Files store inside ahu_database.dat

MTEXT
Box Width The rectangular text area size
Line Spacing Factor The spacing between 2 line of text ( in case you have carriage return, by putting a /P between the te
Line Spacing Style 0 = Dependent, 1 = Exact

MIRROR
Duplicate 0 = Mirror and move, 1 = Create a mirror copy and maintain the source
StartX/Y, End X/Y Does not support OFFSETX/Y, LASTX/Y

HATCH
Style 0=None, 1 = Solid, 2 = Bdiagonal, 3 = Cross, 4 = Diagonal Cross, 5 = Fdiagonal, 6 = Horizontal, 7 = Ver
Angle In Degree
Pattern Name If case style = 12
Block Name If case style = 11

ARC
Start Angle in Degree
End Angle in Degree

LEADER
Leader Type 0 = Line with arrow, 1 = Line without arrow, 2 = Spline with Arrow, 3 = Spline without arrow
Text Is Above 0 = Center, 1 = Above
Text Offset Offset in drawing points (numeric )
Arrow Size Size of Arrow (numeric)
MTEXT The Mtext Drawing Object, refering to row of script in the design

DIM_ORDINATE
X1, Y1 Start Point
X2, Y2 End Point
X/Y Bend 1 X or Y coodinate for bend 1
X/Y Bend 2 X or Y coodinate for bend 2
X ref X reference, default = 0
Y ref Y reference, default = 0
Offset Start Point Offset + means move upward/right, - means move downward/left, default = 0
Text offset default = 0
Decimal default = 0
Text Height default = Auto
Spacing default = 1.5 * TextHeight
retrum obj H retrum obj W
X Y
Line Style Color Degree Rotation LineTypeScale
Line Style Color LineTypeScale
Thickness Line Style Color LineTypeScale
Color LineTypeScale

Leader Type Text Is Above Text Offset MTEXT LineTypeScale

Pos Y String A,B,C,D,E,F,G,H,I TEXT POS X TEXT POS Y Object Row TEXT Color
Pos Y String A,B,C,D,E,F,G,H,I TEXT POS X TEXT POS Y Object Row TEXT Color

Pos Y String A,B,C,D,E,F,G,H,I TEXT POS X TEXT POS Y Object Row TEXT Color
Y3 (X1 - start, X2-center, X3-end)
Offset Y Count Max Width Max Height Centralized

Origin Y

To Y

bottom
bottom
Rotation Width Factor Bold Underline Color String
Rotation Box Width Line Spacing Fac
Line Spacing Style Color String

End Y Duplicate
Back Color Block Name Pattern Name
X/Y Bend 2 X Ref Y Ref Offset Text offset Decimal Text Height
Thickness Line Style Color LineTypeScale
Column Distance
Move without Leader

into this maximum width


into this maximum height
e, 5 = Under and Center, 6 = Over and center, 7 = All

same for each loop, therefore, the search for this object will be based on last object row found

putting a /P between the text )

onal, 6 = Horizontal, 7 = Vertical, 9 = Single Hatch, 10 = Double Hatch, 11 = Block, 12 = Pattern


line without arrow

d/left, default = 0
Line Color
Line Color

Line Color

Spacing Color Text Color


3D COMMANDS (STANDARD INFO)

3D_BOUNDARY left right top bottom Z Min


3D_BOUNDARY_OBJ OBJ ID left right top bottom
3D_BOUNDARY_XY From X From Y left right top
3D_BOUNDARY_TAG OBJ ID tag name left right top

3D COMMANDS (BLOCKS)
3D_BLOCK Block Name Ratio X Ratio Y Ratio Z X
3D_BLOCK_OBJ Start Row End Row Block Name Ratio X Ratio Y

3D COMMANDS (REPETATION)
3D_REPEAT_ABS Start Row End Row Count Num
3D_REPEAT_BLK Start Row End Row Count Num Origin X
3D_REPEAT_ALL Start Row End Row Count Num

3D COMMANDS (SHAPES)
3D_RECT X Y Z Width Height
3D_BOX X Y Z Width Height
3D_PLATE X1 Y1 Z1 X2 Y2
3D_ROD Center X Center Y Center Z Radius Length
3D_ARC Center X Center Y Center Z Radius Start Angle
3D_POLYLINE X1,Y1,Z1,X2,Y Extrusion Line Style Color ExtrudeX
3D_TUBE Center X Center Y Center Z Outer Radius Extrusion
3D_FRAME X Y Z Width Height
3D_SPHERE Center X Center Y Center Z Radius Segment
3D_CONE Center X Center Y Center Z Based Radius Top Radius

****Note : 3D_RECT, 3D_PLATE, 3D_ARC is drawn based on 2D and extend the length in Z direction

3D COMMANDS (TEXT/LEADER)
3D_TEXT X Y Z Size Hor Align

3D COMMANDS (Quick Tools)


3D_FINDOBJ tag name OBJ ID X Y Z
3D_MOVEOBJ OBJ ID From X From Y From Z To X
3D_MOVEGRP Start Row End Row From X From Y From Z
3D_REMOVEOBJ OBJ ID tag name
3D_REMOVE OBJ ID
3D_RATIO OBJ ID Ratio X Ratio Y Ratio Z
3D_MIRROR Start Row End Row Start X Start Y End X
3D_HATCH OBJ ID Hatch Style Angle Scale Fill Color
3D_ROTATEX OBJ ID Angle
3D_ROTATEY OBJ ID Angle
3D_ROTATEZ OBJ ID Angle
3D_COMBINE List of OBJ I Combine Mode

PARAMETER EXPLANATION

3D_HATCH
Style 0=None, 1 = Solid, 2 = Bdiagonal, 3 = Cross, 4 = Diagonal Cross, 5 = Fdiagonal, 6 = Horizont
Angle In Degree
Pattern Name If case style = 12
Block Name If case style = 11

3D_ARC
Start Angle in Degree
End Angle in Degree

3D_COMBINE Can only combine BOX, FRAME, ROD, TUBE, FRAME, CONE, SPHERE, POLYLINE
Combine Mode 0 = Union, 1 = Substraction, 2 = Intersection, 3 = Reverse Substration
Z Max
Z Min Z Max
bottom Z Min Z Max
bottom Z Min Z Max

Y Z return H Return W Return D


Ratio Z X Y Z

Origin Y Origin Z

Extrusion Line Style Color Degree Rotati ExtrudeX ExtrudeY ExtrudeZ


Depth Color Angle
Z2 Thickness Line Style Color ExtrudeX ExtrudeY ExtrudeZ
Color Segment
End Angle Extrusion Line Style Color ExtrudeX ExtrudeY ExtrudeZ
ExtrudeY ExtrudeZ
Color Inner Radius Segment
Extrusion Color Degree Rotation Thickness
Color
Height Color Segment

the length in Z direction

Vert Align Rotation Width Factor Bold Underline Color String

To Y To Z
To X To Y To Z

End Y Duplicate
Back Color Block Name Pattern Name
= Fdiagonal, 6 = Horizontal, 7 = Vertical, 9 = Single Hatch, 10 = Double Hatch, 11 = Block, 12 = Pattern

ERE, POLYLINE
2D COMMANDS

mandatory
not mandatory, will follow default value (see "2D comment") if no fill up
system return value

FORMAT
CREATE_LAYER Name Line Style
1
CREATE_TEXT_STYLE Name Text Height
CREATE_DIM_STYLE Name Text Style
SET_ACTIVE_LAYER Name
SET_ACTIVE_TEXT_STYLE Name
SET_ACTIVE_DIM_STYLE Name
SET_DEFAULT_LAYER
SET_DEFAULT_TEXT_STYLE
SET_DEFAULT_DIM_STYLE

INSERT
IMAGE File name X

REPEAT
REPEAT Start Row End Row
REPEAT_ABS Start Row End Row
REC_ARRAY Start Row End Row

BOUNDARY
BOUNDARY left right
BOUNDARY_ARRAY Start Object Row End Object Row
BOUNDARY_TAG Object Row tag name
BOUNDARY_OBJ Object Row left
BOUNDARY_INSERT_POINT Object Row X

BLOCK
BLOCK_FILE
File Name Ratio X
BLOCK File Name Ratio X
BLOCK_FILE_LANGUAGE File Name Ratio X
BLOCK_LANGUAGE File Name Ratio X
CREATE_BLOCK File Name
BLOCK_OBJ Start Row End Row
MOVEOBJ Object Row X
MOVE_OBJ
MOVEGRP Start Row End Row
MOVE_GRP
REMOVEOBJ Object Row tag name
REMOVE_OBJ
REMOVE Object Row
RATIO Object Row Ratio X
MOVE_BLOCK_TAG Object Row Tag Name
MOVE_BLOCK Object Row Block Name
BLOCK_DIM Object Row Dim Text Height
BLOCK_DIM Object Row Dim Text Height

DRAW
RECT X Y
LINE X1 Y1
ARC Center X Center Y
CIRCLE Center X Center Y
POLYLINE X1,Y1,X2,Y2,… Thickness
LEADER X1,Y1,X2,Y2,… Thickness
TEXT X Y
MTEXT X Y
HATCH Object Row Hatch Style

SPECIAL DRAW
DIM_LEADER_TEXT X1 Y1
DIM_LEADER_TEXT_REPEAT X1 Y1

BENDING_NOTCH H W
OBLONG W H
LINE_ARC_LINE H W
L_SHAPED H W
C_LINE H1 W1
C_SHAPED H1 W1
OMEGA_LINE H1 H2
OMEGA_SHAPED H1 H2
Z_LINE H1 W1
Z_SHAPED H1 W1
L_NOTCH_1 H W
L_NOTCH_2 H W
L_NOTCH_3 H W
DIMENSION
DIM_ROTATE X1 Y1
DIM X1 Y1
DIM_DIA X1 Y1
DIM_ANGLE X1 Y1
DIM_TAG_MODIFY Object Row Tag Name
DIM_TAG Object Row Tag Name

MODIFY
MIRROR Start Row End Row
EDIT_BLOCK_TAG_TEXT Object Row Tag Name
EDIT_CBLOCK_TAG_TEXT File Name Tag Name
ue (see "2D comment") if no fill up

Color

Font Name Width Factor


A,B,C,D,E,F,G,H,I,J,K,L Text Color Line Color

Y Scale

Origin X Origin Y Offset X Offset Y


Count Current Count
Row Count Column Count Row Distance Column Distance

top bottom
left right top bottom
left right top bottom
right top bottom
Y

Ratio Y X Y left
Ratio Y X Y height
Ratio Y X Y left
Ratio Y X Y height

Block Name Ratio X Ratio Y X

From X From Y To X To Y
Ratio Y
X Y
X Y
Arrow Size
Arrow Size

Width Height Thickness Line Style


X2 Y2 Thickness Line Style
Radius Start Angle End Angle Thickness
Radius Thickness Line Style Color
Line Style Color LineT ype Scale
Line Style Color Arrow Size Leader Type
Text Height Hor Align Vert Align Rotation
Text Height Hor Align Vert Align Rotation
Fill Color Back Color Angle Scale

X2 Y2 X/Y Bend 1 X/Y Bend 2


X2 Y2 X/Y Bend 1 X/Y Bend 2

X Y Rotation Thickness
X Y Rotation Thickness
R X Y Rotation
T R1 R2 X
W2 R X Y
W2 T R1 R2
H3 W1 W2 R1
H3 W1 W2 T
W2 R1 R2 X
W2 T R1 R2
BN_H BN_W X Y
BN_H BN_W X Y
BN_R X Y Rotation
X2 Y2 Pos X Pos Y
X2 Y2 Pos X Pos Y
X2 Y2 Pos X Pos Y
X2 Y2 X3 Y3
X1 Y1 X2 Y2
DIM TEXT

Start X Start Y End X End Y


Text
Text
Count Max Width Max Height Centralized

right top bottom


width
right top bottom
width

Y
Color Degree Rotation Line Type Scale
Color Line Type Scale Degree of Rotation
Line Style Color Line Type Scale
Line Type Scale

Text Is Above Text Offset MTEXT Line Type Scale


Width Factor Bold Underline Color String
Box Width Line Spacing Factor Line Spacing Style Color String
Block Name Pattern Name Draw Boundary

X Ref Y Ref Offset Text offset Decimal


X Ref Y Ref Count Current Count Offset

Line Style Color Line Type Scale


Line Style Color Line Type Scale Draw Center Mark
Thickness Line Style Color Line Type Scale
Y Rotation Thickness Line Style Color
Rotation Thickness Line Style Color Line Type Scale
X Y Rotation Thickness Line Style
R2 X Y Rotation Thickness
R1 R2 X Y Rotation
Y Rotation Thickness Line Style Color
X Y Rotation Thickness Line Style
Rotation Thickness Line Style Color Line Type Scale
Rotation Thickness Line Style Color Line Type Scale
Thickness Line Style Color Line Type Scale
String A,B,C,D,E,F,G,H,I,J, TEXT POS X TEXT POS Y Object Row
String A,B,C,D,E,F,G,H,I,J, TEXT POS X TEXT POS Y Object Row
String A,B,C,D,E,F,G,H,I,J, TEXT POS X TEXT POS Y Object Row
Pos X Pos Y String A,B,C,D,E,F,G,H,I,J,K TEXT POS X

Duplicate X1 Y1 X2 Y2
Text Height Spacing Color Text Color
Text offset Decimal Text Height Spacing Color Text Color

Line Type Scale

Color Line Type Scale


Line Style Color Line Type Scale
Thickness Line Style Color Line Type Scale
Line Type Scale
Color Line Type Scale
Text Color Color
Text Color Color
Text Color Color
TEXT POS Y Object Row Text Color Color

X3 Y3 X4 Y4
DEFAULT
Thickness 0
Line Style 1
Color Based on active layer, 0
Based on active dimension style, 0
Line Type Scale 1
Degree Rotation, Rotation 0
Arrow Size Based on active dimension style
Leader Type 0
Text Is Above 1
Text Offset 0
Offset 0
Decimal 0
Text Height Based on active text style
Spacing 1.5
Text Color Based on active layer
String Empty string
Hor Align 0
Vert Align 2
Line Spacing Factor 1
Line Spacing Style 0
Width Factor Based on active text style
Bold 0
Underline 0
Duplicate 0
Degree of Rotation, Angle 0
Draw Center Mark 0
Dim Text Height -1
Arrow Size -1
Scale 1
Draw Boundry 0

LINE STYLE
0 Invisible
1 Solid
2 Dotted Line
3 Hidden2
4 Center Line

DIMENSION
DIM Horizontal/Vertical Dimension
Pos X/Pos Y Coordinate for the dimension text position
String In case need to perform text replacement, else leave it blank

DIM STYLE SETTING


A Rotation, default is 0
B Decimal
C Text Height, A = Auto
D Arrow Size, A = Auto
E Text Distance, A = Auto
F Dimension Point Offset X, A = Auto
G Dimension Point Offset Y, A = Auto
H Text Vertical Adjustment, 0 = Center, 1 = Above
I Text Horizontal Rotation, 0 = Aligned, 1 = Horizontal
J Text Movement, 0 = Keep Dim line with text, 1 - Move with Leader, 2 - Move without
K User Default Text Position, 0 = Yes, 1 = No
L Hide dimension, 1 = hide, 0 = vshow, default = 0
M Hide Extended Line, 0 = No, 1 = Yes
N Dimension Post String

LEADER
Leader Type 0 = Line with arrow, 1 = Line without arrow, 2 = Spline with Arrow, 3 = Spline without
Text Is Above 0 = Center, 1 = Above
Text Offset Offset in drawing points (numeric )
Arrow Size Size of Arrow (numeric)
MTEXT The Mtext Drawing Object, refering to row of script in the design

DIM_LEADER_TEXT
X/Y Bend 1 X/Y coodinate of bend 1 in between of X1 and X2 / Y1 and Y2
X/Y Bend 2 X/Y coodinate of bend 2 in between of X1 and X2 / Y1 and Y2
Offset Start Point Offset + means move upward/right, - means move downward/left, defaul
Spacing Spacing coeffient x text height between dim_ordinate in order to prevent overlappin

REPEAT
Start Row Starting of script row
End Row Ending of script row
Origin X Starting of block insertion X
Origin Y Starting of block insertion Y
Offset X X Distance between Block
Offset Y Y Distance between Block
Count Number of blocks
Max Width 0 = To force to use Count value above, else adjust number of block to fit into this ma
Max Height 0 = To force to use Count value above, else adjust number of block to fit into this ma
Centralized X = Centralized X, Y = Centralized Y, XY = Centralized XY
TEXT
X X location of the text object, affected by horizontal alignment
Y Y location of the text object, affected by vertical alignment
Size Height of text in points
Hor Align 0 = Left, 1 = Right, 2 = Center, 3 = Horizontal Aligned, 4 = Fit
Vert Align 0 = Top, 1 = Bottom, 2 = Baseline, 3 = Center
Rotation in Degree
Width Factor Horizontal scale, default = 1
Bold 0 = None, 1 = Bold
Underline 0 = None, 1 = Underline, 2 = Overline, 3 = Under and Over, 4 = Center Line, 5 = Under

MTEXT
Box Width The rectangular text area size
Line Spacing Factor The spacing between 2 line of text ( in case you have carriage return, by putting a /P
Line Spacing Style 0 = Dependent, 1 = Exact

MIRROR
Duplicate 0 = Mirror and move, 1 = Create a mirror copy and maintain the source
StartX/Y, End X/Y Does not support OFFSETX/Y, LASTX/Y
*Don't tick the involved the command(Start Row to End Row)

OBLONG
Draw Center Mark 0 = No, 1 = Yes

HATCH
Style 0=None, 1 = Solid, 2 = Bdiagonal, 3 = Cross, 4 = Diagonal Cross, 5 = Fdiagonal, 6 = Hor
Angle In Degree, default is 0
Pattern Name If case style = 12
Block Name If case style = 11
Darw Boundary 1 = true, 0 = false
ove with Leader, 2 - Move without Leader

ine with Arrow, 3 = Spline without arrow

t in the design

eans move downward/left, default = 0


nate in order to prevent overlapping.

number of block to fit into this maximum width


number of block to fit into this maximum height
d Over, 4 = Center Line, 5 = Under and Center, 6 = Over and center, 7 = All

ve carriage return, by putting a /P between the text )

maintain the source

gonal Cross, 5 = Fdiagonal, 6 = Horizontal, 7 = Vertical, 9 = Single Hatch, 10 = Double Hatch, 11 = Block, 12 = Pattern
, 12 = Pattern

You might also like