EduCSE Blog

Share

Advertise here

ScriptDWG Tutorials

Author: Win Aung Cho
24-Aug-2026


Drawing with Script drawing tutorials.
Follow the ScriptDWG
cse4civil.nft/cad/scriptdwg

Tutorial-1



// primative methid
// https://edu.structsoftlab.asia/demo/
// ScriptDWG/data/tutorial1.scr
unitscale 4
textAlign center
font 60 Tahoma
text 120,-72 "Ground floor Plan"

layer grid
text 0,-54 A
text 120,-54 B
text 264,-54 C
circle 0,-54 8
circle 120,-54 8
circle 264,-54 8
text -54,0 1
text -54,144 2
text -54,288 3
circle -54,0 8
circle -54,144 8
circle -54,288 8
font 40 Tahoma
textAlign left
strokeColor gray
setLineDash [30,15,5]
line -24,0 12*26,0
line -24,144 12*26,144
line -24,288 12*26,288

line 0,-24 0,12*32
line 120,-24 120,12*32
line 264,-24 264,n12*32

strokeColor black
setLineDash []
dimalign 0,0 0,144 36
dimalign 0,144 0,288 36

dimalign 0,0 120,0 -36
dimalign 120,0 264,0 -36



Drawing result of script tutorial-1
Advertise here

Drawing result of script tutorial-1
Advertise here

Tutorial-2


Programming facility

// using array
unitscale 4
textAlign center
font 60 Tahoma
text 120,-72 "Ground floor Plan"

layer grid
text [0,120,264], -54 "ABC"
circle [0,120,264], -54 8

text -54, [0,144,288] "123"
circle -54, [0,144,288] 8
font 40 Tahoma
textAlign left
strokeColor gray
setLineDash [30,15,5]
line -24,[0,144,288] 12*26,[0,144,288]
line [0,120,264],-24 [0,120,264],12*32

strokeColor black
setLineDash []
dimalign 0,[0,144] 0,[144,288] 36
dimalign [0,120],0 [120,264],0 -36



Tutorial-3


Usibg with variables and numerical expression

// using array and variable
ga=0
gb=12*10
gc=gb+12*12
g1=0
g2=12*12
g3=g2+12*12

unitscale 4
textAlign center
font 60 Tahoma
text gb,-72 "Ground floor Plan"

layer grid
text [ga,gb,gc], -54 "ABC"
circle [ga,gb,gc], -54 8

text -54, [g1,g2,g3] "123"
circle -54, [g1,g2,g3] 8
font 40 Tahoma
textAlign left
strokeColor gray
setLineDash [30,15,5]
line -24,[g1,g2,g3] 12*26,[g1,g2,g3]
line [ga,gb,gc],-24 [ga,gb,gc],12*32

strokeColor black
setLineDash []
dimalign ga,[g1,g2] ga,[g2,g3] 36
dimalign [ga,gb],g1 [gb,gc],g1 -36



Tutorial-4


Completing floor plan

// using array and variable
// adding beams and column
ga=0
gb=12*10
gc=gb+12*12
g1=0
g2=12*12
g3=g2+12*12

cw = 16
ch = 12
bw = 10
bh = 14
unitscale 4
textAlign center
font 60 Tahoma
text gb,-72 "Ground floor Plan"

layer grid
text [ga,gb,gc], -54 "ABC"
circle [ga,gb,gc], -54 8

text -54, [g1,g2,g3] "123"
circle -54, [g1,g2,g3] 8
font 40 Tahoma
textAlign left
strokeColor gray
setLineDash [30,15,5]
line -24,[g1,g2,g3] 12*26,[g1,g2,g3]
line [ga,gb,gc],-24 [ga,gb,gc],12*32

strokeColor black
setLineDash []
dimalign ga,[g1,g2] ga,[g2,g3] 36
dimalign [ga,gb],g1 [gb,gc],g1 -36


layer "column_
lineWidth 3
fill true
color "88aa88"
rect [ga-cw/2, gb-cw/2, gc-cw/2],g1-ch/2 cw ch
rect [ga-cw/2, gb-cw/2, gc-cw/2],g2-ch/2 cw ch
rect [ga-cw/2, gb-cw/2, gc-cw/2],g3-ch/2 cw ch
fill false

layer "beam"
lineWidth 2
rect [ga-cw/2, gb-bw/2, gc+cw/2-bw],g1+ch/2 bw g2-g1-ch
rect [ga-cw/2, gb-bw/2, gc+cw/2-bw],g2+ch/2 bw g3-g2-ch

rect [ga+cw/2,gb+cw/2],g1-ch/2 [gb-ga-cw,gc-gb-cw] bw
rect [ga+cw/2,gb+cw/2],g2-bw/2 [gb-ga-cw,gc-gb-cw] bw
rect [ga+cw/2,gb+cw/2],g3+ch/2-bw [gb-ga-cw,gc-gb-cw] bw

layer "slab"
lineWidth 3
rect ga-cw/2,g1-ch/2 gc+cw g3+ch



Finished floor plan
Advertise here

Advertise here

Author: Win Aung Cho
24-Aug-2026

3