Macros
Macros
Macros
technical_illustration_redefined
IsoDraw Macro Language
VERSION: 6.1.04.003
RELEASE DATE: June 19, 2006
Introduction ................................................................................................................................2
New ..............................................................................................................................................27
Open ............................................................................................................................................27
Close ............................................................................................................................................29
Save ..............................................................................................................................................29
Import Layers ...........................................................................................................................31
Save Layers ...............................................................................................................................31
Place ............................................................................................................................................31
Export ..........................................................................................................................................32
Quit ..............................................................................................................................................33
Cut ................................................................................................................................................35
Copy .............................................................................................................................................35
Duplicate ....................................................................................................................................35
Delete Selection ......................................................................................................................35
Paste ............................................................................................................................................36
3
Select All .....................................................................................................................................36
Select None ...............................................................................................................................36
Select If / SubSelect If ..........................................................................................................37
Move ............................................................................................................................................41
Align .............................................................................................................................................42
Distribute ...................................................................................................................................42
Preferences ................................................................................................................................42
Arrange .......................................................................................................................................43
Convert Selection into Elements ......................................................................................43
Convert Selection into Bezier Parts ................................................................................44
Convert Selection into Polylines ......................................................................................44
Join Polylines ............................................................................................................................44
Join Beziers ...............................................................................................................................44
Generate Contour ...................................................................................................................44
Create Compound Path .......................................................................................................45
Groups .........................................................................................................................................45
Group Selection .................................................................................................................45
Ungroup Selection ............................................................................................................45
Start Group ..........................................................................................................................46
End Group ............................................................................................................................46
Mask At .......................................................................................................................................46
Release Mask ............................................................................................................................47
Lock ..............................................................................................................................................47
Unlock .........................................................................................................................................47
Transformation 3D .................................................................................................................47
Set Image Transparency .......................................................................................................47
Import Selection .....................................................................................................................48
Text ...............................................................................................................................................53
Convert Text to Paths ...........................................................................................................54
4
Delete Layer ..............................................................................................................................56
Activate Layer ..........................................................................................................................57
Delete All Empty Layers .......................................................................................................57
Selected Elements to Active Layer ..................................................................................57
Selected Text to Active Layer ............................................................................................57
Pens ..............................................................................................................................................75
5
Add Pen .................................................................................................................................75
Delete Pen ............................................................................................................................75
Set Active Pen .....................................................................................................................76
Set Lineoptions ...................................................................................................................76
Styles ...........................................................................................................................................77
Add Style ...............................................................................................................................77
Delete Style ..........................................................................................................................77
Set Active Style ..................................................................................................................78
Shadows .....................................................................................................................................78
Add Shadow ........................................................................................................................78
Delete Shadow ....................................................................................................................79
Set Active Shadow ............................................................................................................79
Grids .............................................................................................................................................79
Add Grid ................................................................................................................................79
Delete Grid ...........................................................................................................................80
Formats .......................................................................................................................................81
Add Format ..........................................................................................................................81
Delete Format .....................................................................................................................81
Set Active Format ..............................................................................................................82
Viewports ...................................................................................................................................82
Add Viewport ......................................................................................................................82
Delete Viewport ..................................................................................................................82
Execute Viewport ...............................................................................................................83
Add Layerstatus ..................................................................................................................83
Remove Layerstatus .........................................................................................................84
Callouts .......................................................................................................................................84
Add Callout_Style .............................................................................................................84
Delete Callout_Style .........................................................................................................84
Renumber Callouts ...........................................................................................................85
Colors ...........................................................................................................................................87
Add Color ..............................................................................................................................87
Delete Color .........................................................................................................................87
3D Commands ................................................................................... 89
3D View .......................................................................................................................................89
3D SetView ................................................................................................................................89
3D Project ..................................................................................................................................90
3D Center ...................................................................................................................................90
3D ZoomExtent .......................................................................................................................90
3D HLRMode .............................................................................................................................91
3D Mode .....................................................................................................................................91
3D Explosion .............................................................................................................................91
3D Move .....................................................................................................................................92
3D Axis ........................................................................................................................................92
3D Transform ............................................................................................................................93
6
3D Reset .....................................................................................................................................93
3D SetDist ..................................................................................................................................93
3D Hole rectangle ..................................................................................................................94
3D Hole polygon start ..........................................................................................................94
3D Hole polygon points .......................................................................................................94
3D Hole polygon end ............................................................................................................95
FWrite ..........................................................................................................................................97
FNew ............................................................................................................................................97
Log ................................................................................................................................................97
Menu ...........................................................................................................................................98
Debugging Commands ........................................................................................................99
Debug Step ..........................................................................................................................99
Debug Commands ............................................................................................................99
Debug Reset ..................................................................................................................... 100
Debug Stack ..................................................................................................................... 100
Debug Locals .................................................................................................................... 100
Debug Globals ................................................................................................................. 100
Wait Timer .............................................................................................................................. 100
Extension ................................................................................................................................ 101
Increase Text Elements ...................................................................................................... 101
Decrease Text Elements .................................................................................................... 102
7
Simple Data Types ...........................................................................115
Integers ....................................................................................................................................115
Floating-Point Numbers ...................................................................................................115
Strings ......................................................................................................................................115
Booleans ..................................................................................................................................116
Point ..........................................................................................................................................117
Point3 .......................................................................................................................................117
Rectangle ................................................................................................................................117
RGBColor .................................................................................................................................117
CMYKColor .............................................................................................................................118
ColorSpec ................................................................................................................................118
Fill ...............................................................................................................................................119
Mouse Event ..........................................................................................................................120
Document or ActiveDoc - The Document Object ...................................................120
document.name ..............................................................................................................121
document.path ................................................................................................................121
document.penCount .....................................................................................................121
document.active_Pen ...................................................................................................121
document.styleCount ...................................................................................................121
document.active_style .................................................................................................122
document.shadowCount .............................................................................................122
document.active_shadow ...........................................................................................122
document.gridCount .....................................................................................................122
document.active_grid ..................................................................................................122
document.formatCount ...............................................................................................122
document.active_textFormat ....................................................................................122
document.viewportCount ...........................................................................................123
document.viewports[ ] .................................................................................................123
document.calloutCount ...............................................................................................124
document.active_callout ............................................................................................125
document.layerCount ...................................................................................................125
document.layers[ ] .........................................................................................................125
document.selectedElements ......................................................................................125
document.firstSelectedElement ...............................................................................125
document.selectedParts ..............................................................................................126
document.modified .......................................................................................................126
document.grid .................................................................................................................126
document.window .........................................................................................................128
document.shadow ..........................................................................................................129
document.thread ............................................................................................................130
document.thickthin .......................................................................................................131
document.background .................................................................................................133
document.lineOptions ..................................................................................................133
document.simpleEllipsePrinting ...............................................................................134
8
document.colorCount .................................................................................................. 134
document.hatchingCount .......................................................................................... 134
document.patternCount ............................................................................................. 134
Element - The Element Object ....................................................................................... 135
element.element_id ...................................................................................................... 135
element.type .................................................................................................................... 135
element.locked ................................................................................................................ 136
element.mask ................................................................................................................... 136
element.box ...................................................................................................................... 136
element.firstChild ........................................................................................................... 136
element.lastChild ............................................................................................................ 137
element.previousSibling .............................................................................................. 137
element.nextSibling ...................................................................................................... 138
element.parent ................................................................................................................ 139
element.layer ................................................................................................................... 140
element.selected ............................................................................................................. 140
element.nextSelectedElement .................................................................................. 140
element.lineCap .............................................................................................................. 140
element.lineJoin .............................................................................................................. 141
element.miterLimit ........................................................................................................ 141
element.overPrint .......................................................................................................... 141
element.segmentCount ............................................................................................... 141
element.fill ........................................................................................................................ 141
element.group.childCount .......................................................................................... 141
element.document ........................................................................................................ 141
element.info ..................................................................................................................... 142
element.info.attributes[ ] ............................................................................................ 143
element.info.view_context ........................................................................................ 144
element.line ...................................................................................................................... 144
element.ellipse ................................................................................................................. 145
element.innerthread ..................................................................................................... 147
element.outerthread ..................................................................................................... 148
element.callout ............................................................................................................... 150
element.rect ..................................................................................................................... 154
element.polygon ............................................................................................................. 155
element.marker ............................................................................................................... 156
element.bezier ................................................................................................................. 156
element.text ..................................................................................................................... 157
element.image ................................................................................................................. 159
Layer - The Layer Object ................................................................................................... 161
layer.name ......................................................................................................................... 161
layer.screenColor ............................................................................................................ 161
layer.locked ....................................................................................................................... 162
layer.active ........................................................................................................................ 162
layer.printable .................................................................................................................. 162
layer.exportable .............................................................................................................. 162
9
layer.visible ........................................................................................................................162
layer.hasElements ...........................................................................................................162
layer.useColor ...................................................................................................................162
layer.firstChild ..................................................................................................................163
layer.lastChild ...................................................................................................................163
layer.previousSibling .....................................................................................................163
layer.nextSibling .............................................................................................................163
Preferences (Part I) - The Application Object ...........................................................163
app.version ........................................................................................................................164
app.docCount ...................................................................................................................165
app.documents[ ].name ...............................................................................................165
app.penCount ...................................................................................................................165
app.styleCount .................................................................................................................165
app.shadowCount ..........................................................................................................165
app.GridCount .................................................................................................................165
app.colorCount ................................................................................................................166
app.hatchingCount ........................................................................................................166
app.patternCount ...........................................................................................................166
app.formatCount ............................................................................................................166
app.calloutCount ............................................................................................................166
app.password ...................................................................................................................166
app.drawOffscreen .........................................................................................................166
app.useAntiAliasing .......................................................................................................167
app.showLineStyles ........................................................................................................167
app.showToolTips ............................................................................................................167
app.showRulers ...............................................................................................................167
app.showCursorInfo ......................................................................................................167
app.magnetFlags .............................................................................................................167
app.selectableFills ...........................................................................................................168
app.useIsoExtOnMac .....................................................................................................168
app.allowInternet ...........................................................................................................168
app.updatePeriod ...........................................................................................................168
app.numberOfUndos .....................................................................................................168
app.autoSave ....................................................................................................................169
app.autoSaveMinutes ...................................................................................................169
app.useEllipsesIn3DTools .............................................................................................169
app.preview .......................................................................................................................169
app.compare .....................................................................................................................170
app.options3D ..................................................................................................................171
app.project3D ...................................................................................................................171
app.dimensions ................................................................................................................172
app.grid ...............................................................................................................................175
app.window ......................................................................................................................177
app.shadow .......................................................................................................................178
app.thread .........................................................................................................................178
app.thickthin ....................................................................................................................180
10
app.polygontool .............................................................................................................. 181
app.ellipsetool ................................................................................................................. 182
app.rectangletool ........................................................................................................... 182
app.background .............................................................................................................. 182
app.lineOptions ............................................................................................................... 182
app.simpleEllipsePrinting ............................................................................................ 183
app.curMacroTransform .............................................................................................. 183
app.dtd ............................................................................................................................... 184
app.standardTxtFormat ................................................................................................ 184
app.option ......................................................................................................................... 184
app.interaction ................................................................................................................ 185
Preferences (Part II) - Data Exchange Settings ...................................................... 185
Import CGM ...................................................................................................................... 185
Export CGM ...................................................................................................................... 187
Export EPS ......................................................................................................................... 191
Import Illustrator ........................................................................................................... 191
Export Illustrator ............................................................................................................ 191
Export SVG ........................................................................................................................ 192
Import IGES ...................................................................................................................... 193
Export IGES ....................................................................................................................... 196
Import DWG ..................................................................................................................... 199
Export DWG ...................................................................................................................... 202
Import DXF ........................................................................................................................ 202
Export DXF ........................................................................................................................ 204
Import VRML .................................................................................................................... 205
Import Wavefront .......................................................................................................... 207
Export HPGL ..................................................................................................................... 208
Export TIFF ......................................................................................................................... 208
Export JPEG ...................................................................................................................... 209
Export PNG ....................................................................................................................... 210
Export BMP ....................................................................................................................... 211
Export PCX ........................................................................................................................ 212
Export CALS ...................................................................................................................... 213
Export Text ........................................................................................................................ 214
Export Object List ........................................................................................................... 215
Export Interleaf ............................................................................................................... 215
Export MIF ......................................................................................................................... 216
Export PICT ........................................................................................................................ 216
Import WMF ..................................................................................................................... 216
Export WMF ...................................................................................................................... 216
Sub Data Types ..................................................................................................................... 217
.Pens[ ] ................................................................................................................................ 217
.linestyles[ ] ....................................................................................................................... 218
.shadows[ ] ........................................................................................................................ 219
.colors[ ] .............................................................................................................................. 220
.hatchings[ ] ...................................................................................................................... 220
11
.patterns[ ] .........................................................................................................................221
.txtFormats[ ] ....................................................................................................................221
.callouts[ ] ..........................................................................................................................222
.grids[ ] ................................................................................................................................225
...............................................................................................................................................226
Appendix ..........................................................................................227
12
Language Basics
Lexical Structure
Language Basics 13
Case Sensitivity
#example 1:
message "hello, world"
MESSAGE "hello, world"
mEsSaGe "hello, world"
#######################
#example 2:
define out as string
define OUT as string
#CORRECT:
Save "C:\temp\output.com" "CGM"
#INCORRECT:
Save "C:\temp\output.com" "cgm"
if ( a > b) then
message "hello world"
end if
14 Language Basics
Line Continuation
Statements can be continued from one line to the next with the use of a
backslash “\”.
Every part of a statement that consists of more than one word has to be
separated by a space:
create line
append line segment
create callout
Multiple spaces have no effect on the macro. You can take advantage of
this flexible formatting to make your code more readable (by lining up
assignments, indenting, etc.):
Comments
Comments give useful information to people who read your code, but are
ignored by IsoDraw. Even if you are the only person who will ever read
your code it can be beneficial to include comments. It will make the code
easier to understand when reviewing it in the future.
Comment Sign
When IsoDraw encounters a hash mark (#) within the code, everything
from that hash mark to the end of the line is recognized as a comment.
Language Basics 15
#the next line draws an ellipse
create ellipse 113.34 112.99 99 23.5 27
Literals
Literals are data values that appear directly in an IsoDraw macro. The
following are examples of literals in IsoDraw:
100
off
23.987
(-27)
245,666
'Hello'
"good evening"
false
Identifiers
Variable Names
george
positionX
y9
element_description
16 Language Basics
geoffrey
myLines
27 Ellipses for your pleasure
IsoDraw_4_ever
>>> !do not execute! <<<
Keywords
A keyword is a word reserved by the IsoDraw Macro Language for its own
functionality. Keywords must not be used as variable names. The following
Table lists some IsoDraw macro keywords:
Macros
MACRO macroname
END MACRO
There are two optional parameters available for macros: protected and
not_in_Menu. With the keyword "protected" after the macro name you
can protect the macro from being deleted using the "Delete Macro" dialog
or being overwritten by a recording. All macros that have the optional
keyword "not_in_menu" after their name are not shown in the menu
“Macros” but can still be started through the "Run Macro" dialog.
A single macro file may contain several macros. This is useful for grouping
different macros of the same topic.
Macros can not be nested!
Some examples:
Language Basics 17
Macro Do Something
message "I’m doing something"
end Macro
##############################################
##############################################
##############################################
SubMacros
SUBMACRO subMacroname
END SUBMACRO
An example:
SubMacro messenger
message "Here’s your message"
end SubMacro
18 Language Basics
Variables
There are two types of variables in IsoDraw macros - local and global.
Global variables can be accessed from all loaded macros within IsoDraw
and local variables can only be accessed from within the macro they are
defined.
Global variables can be accessed from all macro files as long as they are
loaded. They have to be defined outside a macro with the keyword
"Global".
Macro globalsTest
gText = "Hi, I'm a global."
message gText
end Macro
Macro localsTest
define myInt as integer
define myFloat as float
myInt = 21
myFloat = 2.77889
message myInt
message myFloat
end Macro
Comparison Operators
Language Basics 19
Comparison operators compare operands. The result is always either true
or false.
Equality (=)
If both operands are equal, this operator returns true; otherwise, it
returns false.
Inequality (<>)
If both operands are not equal, this operator returns true;
otherwise, it returns false.
20 Language Basics
If
IF (expression) THEN
statement
END IF
IF (expression) THEN
statement
ELSE
statement
END IF
For example:
Language Basics 21
IF (expression) THEN
true_statement_1
IF (expression) THEN
true_statement
ELSE
false_statement
END IF
true_statement_2
ELSE
IF (expression) THEN
true_statement
END IF
false_statement
END IF
While
WHILE (expression)
statement
END WHILE
If the expression evaluates as true, the statement is executed and then the
expression is reevaluated. If it is true again the body of the loop is
executed and so on. The loop exits when the expression is evaluated as
false.
A simple example where 10 parallel vertical lines are printed on the screen:
define i as integer
i = 1
while (i <= 10)
create line 5*i 0 5*i 50
i = i + 1
end while
Like the if statement you can also nest the while statement:
WHILE (expression)
#do something several times
WHILE (expression)
#do something different
END WHILE
END WHILE
22 Language Basics
For
The for statement is similar to the while statement, except that it adds
counter initialization and counter manipulation expressions. A for
statement looks like:
define i as integer
for i = 0 to 90
create ellipse 300 200 100 180 i
create ellipse 300 200 100 90 i
end for
Every time the loop returns to its beginning the counter (i in this case) is
increased by 1. In a for statement, the variable type must be an integer.
As an option, you can add the step command to the for statement:
define i as integer
for i = 0 to 90 step 5
create ellipse 300 200 100 180 i
create ellipse 300 200 100 90 i
end for
Language Basics 23
Although the for statement is similar to the while statement it is often
shorter and easier to read than the equivalent while loop. For example a
while loop that counts from 1 to 10 and prints the numbers in a message
window:
Break
The break statement breaks the running "for" or "while" loop and
continues the macro after the next "end for" or "end while":
24 Language Basics
Macro myOutbreak
define x as integer
define y as integer
define ea as integer
x = 1
while (x <= 12)
y = 1
while (y <= 12)
ea = 11 * (x - 1) + 5 * y + 20
if (ea > 90)
break
end if
create ellipse 35*x 30*y 10 ea 30
y = y + 1
end while
x = x + 1
end while
end Macro
Run
RUN (Sub)macroName
Language Basics 25
SubMacro routine
message "in routine"
end SubMacro
##############################################
Macro main
message "in main"
run routine
message "back in main"
end Macro
Return
Using the Return statement inside a subMacro returns the given value
as a result to the calling macro. The syntax is:
RETURN expression
SubMacro FindPageFormat
Define s as String
Define p as Point
p.x = activeDoc.window.pageX
p.y = activeDoc.window.pageY
If ( p.x > p.y )
s = "landscape"
Else
s = "portrait"
End If
Return s
End Submacro
Macro GetPageFormat
Define format as String
format = RUN FindPageFormat
Message "The page is in the " + format + "
format"
End Macro
26 Language Basics
File Menu
With this group of commands you can directly access most of the features
from the IsoDraw File Menu.
New
The new command creates a new document. After being created this new
document will be active.
NEW "template"
You can define a path to a template-file or you can just give a file-name.
In this case the template folder is searched for the template file.
##############################################
Open
File Menu 27
The open command opens a document as long as it is in a format that can
be interpreted by IsoDraw. After being opened that document is active.
OPEN "path"
The optional parameter path is used to define the path to the document
that should be loaded. You should always define relative paths. If the
parameter path is not given, the user can choose a file through the
standard open-file dialog. If there is only a path without a file name in the
path-parameter this path is the default path in the open-file dialog.
###########################################
28 File Menu
Close
The close command closes the active document or all open documents.
If the keyword all_windows is given the close command closes all open
documents.
confirm_yes
All unsaved documents will be saved before closing. If a document
was not saved before, a file-save dialog will appear asking the user
for a name and path. If the user cancels this dialog the macro itself
will terminate.
confirm_no
All documents will be closed whether they were saved before or not.
ask_confirm
Before closing any unsaved document the user will be asked if he
would like to save that document. If the user cancels the dialog the
macro itself will be terminated.
close
close confirm_yes
Save
The save command saves the active document in the IsoDraw or CGM
format.
File Menu 29
The optional path parameter defines where and under what name the
document should be saved. If the parameter is not given the actual path
of the active document is taken. If the document was not saved before the
path will be requested through a dialog.
"default"
Actual IsoDraw version or CGM-format if set as native in the
preferences.
"version_6"
IsoDraw 6 format
"version_5"
IsoDraw 5 format
"version_4"
IsoDraw 4 format
"version_3"
IsoDraw 3 format
"CGM"
CGM format
#save on a Mac
save "Macintosh HD: My Files: xy.iso"
30 File Menu
Import Layers
The import layers command imports the defined layers from the
defined document.
#importing 3 layers
import layers "c:\work\engine.iso"
"engine_mount" "motor_starter"
"motor_control_unit"
Save Layers
The save layers command saves all defined layers from the current
document as an standard IsoDraw file.
The path parameter defines where and under what name the document
will be saved.
Place
File Menu 31
The optional parameter path is used to define the placed file’s path. You
should always define relative paths. If the parameter path is not given, the
user can choose a file through the standard open-file dialog.
The optional parameter rectangle defines the lower left corner and the
upper right corner of the target-rectangle. The coordinates should be
given as x1 y1 x2 y2 where the first pair defines the lower left corner (x1
y1) and the second pair defines the upper right corner (x2 y2).
#no parameters
place
Export
The export command exports the current document in the given format.
The path parameter is used for defining where and under what name the
document should be exported.
With the exportformat parameter you can define the format you
would like to save the file as. The following table lists the available formats
with their corresponding keys:
32 File Menu
KEY Format
AI Adobe Illustrator
BMP Bitmap
CALS_Raster Continuous Acquisition and Lifecycle Support
CGM Computer Graphics Metafile
DWG the file format of AutoCAD
DXF Drawing Exchange Format
EPSF Encapsulated PostScript File
HPGL Hewlett Packard Graphics Language
IGES Initial Graphics Exchange Standard
Interleaf a widely used publishing system
JPEG a raster format
MIF Maker Interchange Format
Objects_Text all object informations as text file
PCX a raster format
PICT PICTure format from Apple Macintosh
PNG Portable Network Graphic
SVG Scalable Vector Graphics
SVGZ compressed SVG
Text_Excerpt one of IsoDraw's own formats
TIFF Tagged Image File Format
WMF Windows Meta File
Quit
QUIT saveconfirm
File Menu 33
The optional saveconfirm parameter specifies how unsaved
documents will be handled. If the parameter is not given it will be handled
as the condition ask_confirm. The parameter saveconfirm can have 3
different states:
confirm_yes
All unsaved documents will be saved before closing. If a document
was not saved before, a file-save dialog will appear asking the user
for a name and path. If the user cancels this dialog the macro itself
will terminate.
confirm_no
All documents will be closed whether they were saved before or not.
ask_confirm
Before closing any unsaved document the user will be asked if he
would like to have that document saved. If the user cancels this
dialog the macro itself will be terminated.
#quit
quit confirm_yes
34 File Menu
Edit Menu
With this group of commands you can directly access most of the features
from the IsoDraw Edit Menu. The commands "undo" and "redo" will not be
recorded through the IsoDraw macro recorder.
Cut
With the cut command you can remove selected elements. The elements
are deleted and saved in the program’s clipboard, replacing the former
contents of the clipboard. The cut elements can be retrieved from the
clipboard at any time through the command paste.
CUT
Copy
With the copy command you can copy selected elements into the
program’s clipboard, replacing the former contents of the clipboard. You
can retrieve the copied elements from the clipboard at any time through
the command paste.
COPY
Duplicate
With the duplicate command you can paste a copy of the selected
elements into the document. To a certain degree the command is a
combination of the commands "copy" and "paste same_position".
However the selected elements are not saved into the clipboard. This has
the advantage that the old contents of the clipboard are retained.
DUPLICATE
Delete Selection
Edit Menu 35
The delete selection command deletes the current selection.
DELETE SELECTION
Paste
The paste command pastes the contents of the clipboard into the middle
of the screen window. Even after you have activated another IsoDraw file,
the elements are still pasted into the middle of the screen.
Select All
The select all command activates all the elements and groups in the
current document. Elements located on locked layers are not activated.
SELECT ALL
Select None
36 Edit Menu
SELECT NONE
Select If / SubSelect If
The subselect if command, like the select if command, lets you select
elements according to specific criteria. The difference between the two
commands is that subselect if selects the specified elements from an
already existing selection.
Object_info
Object_name
Object_tip
Object_attribute
"line"
"rectangle"
"polygon"
Edit Menu 37
"marker"
"ellipse"
"inner_thread"
"outer_thread"
"bezier"
"text"
"placed_file"
"image"
"callout"
any "string"
38 Edit Menu
any "string"
any "string"
any "string"
any "string"
any "string"
any "string"
any float
Edit Menu 39
"centered"
"left"
"right"
"medium"
"middle"
"top"
"bottom"
"base_line"
any float
"normal"
"bold"
"italic"
"bolditalic"
any float OR
"$AUTOMATIC"
any float
any "string"
40 Edit Menu
(SUB)SELECT IF object_attribute_value operand_1
comparison_operator operand_2
For this notation both operands could become any string and the
comparison_operator is is (or optional is equal to) or it’s
negation is not (or optional is not equal to) or contains.
Move
The move command moves the current selection. Without any parameter
given the "move" - dialog is opened.
MOVE
If you just want to move the active selection, use the selection
parameter and if you want to move and copy the selection you have to
use the copy parameter.
If you want to copy with connecting lines, use the optional parameter
connect.
If you want to move patterns with reference to elements, use the optional
parameter no_elements.
If you want to move only the elements, use the optional parameter
no_patterns.
Edit Menu 41
#just moving the selection
move selection 123.22 (-11.98) no_patterns
Align
Align direction
Distribute
Distribute direction
Preferences
The preferences can be accessed through the application object. Please see
Preferences (Part I) - The Application Object and Preferences (Part II) - Data
Exchange Settings for further details.
42 Edit Menu
Element Menu
With this group of you can directly access most of the features from the
IsoDraw Element Menu. Commands to select elements can be found
within the Edit Menu chapter or within the Selecting Elements chapter.
Arrange
With the arrange command you can reorder elements, bringing them
above or below others.
Arrange direction
Arrange top
Element Menu 43
Convert Selection into Bezier Parts
Join Polylines
With the join polylines command you can join selected lines and
polylines into a single polyline
Join Polylines
Join Beziers
With the join beziers command you can join selected elements into
a single Bezier.
Generate Contour
44 Element Menu
With the generate contour command you can create a continous,
closed contour from the selected elements.
Generate Contour
Groups
Group Selection
With the group selection command you can create a group from all
selected elements.
GROUP SELECTION
macro all_lines_in_one_group
select if type is "line"
group selection
end macro
Ungroup Selection
The ungroup selection command lets you ungroup the group you
have selected.
The optional parameter deep defines that the command should ungroup
all nested groups in the selection. This is similar to using the shift key
when ungrouping manually.
Element Menu 45
Start Group
START GROUP
End Group
The end group command closes the last grouping level that was started
with start group.
END GROUP
macro nested_groups
start group
start group
Create Ellipse 254.557 195.959 30
240 35.264
Create Ellipse 197.99 195.959 30
300 35.264
Create Ellipse 226.274 244.949 30
180 35.264
end group
Create Rectangle 226.274 146.968
282.843 179.628 282.843 244.949 226.274 212.288
Create Rectangle 282.843 244.949
226.274 277.608 169.705 244.949 226.274 212.288
Create Rectangle 169.705 244.949
169.705 179.628 226.274 146.968 226.274 212.288
end group
end macro
Mask At
With the mask at command you can mask the selected element with the
element at the location specified.
46 Element Menu
The X and Y parameters specify the location of the element which will
be used to mask the selected element.
Release Mask
With the release mask command you can remove the selected mask.
Release Mask
Lock
Lock
Unlock
Unlock
Transformation 3D
Transformation 3D
Element Menu 47
With the set image transparency command you can toggle the
transparency setting for raster images.
The switch parameter allows you to change the setting. Allowed values
are “on” and “off”.
Import Selection
Import Selection
48 Element Menu
Objects Menu
With this group of commands you can directly access most of the features
from the IsoDraw Object Menu.
Create Object_info
The element parameter defines the element that should get an object
info. For further information see Document or ActiveDoc - The Document
Object and Element - The Element Object.
define el as element
el = activeDoc.firstSelectedElement
create object_info el
Delete Object_info
The delete object_info command removes the object info from all
selected objects
The optional parameter deep removes the object info even in groups or
subgroups.
Create Object_attribute
The name parameter defines the name of the new attribute as string.
Objects Menu 49
The type parameter defines the type of the new attribute. Possible data
types are “integer”, “float”, “string” and “link” where the “link” is just a
special string.
The element parameter defines the element which should get a new
attribute to its object_info. The element must already have an object info
(see create object_info).
define el as element
el = create ellipse 100 100 100 90 90
create object_info el
End Macro
Delete Object_attribute
The name parameter defines the name of the attribute that has to be
removed.
50 Objects Menu
Create Hotspots
The n parameter defines the number of characters from the text element
that will be assigned as the Object Name.
This function returns an integer value. This value represents the number
of hotspots created.
Objects Menu 51
52 Objects Menu
Text Menu
With this group of commands you can directly access most of the features
from the IsoDraw Text Menu.
Text
The text command activates one text property and assigns it to all
selected text elements. All text elements created after the execution of
this command will also have these properties.
If the attribute is font the value could assume any installed font name
as a quoted string.
If the attribute is size the value could assume any float number as a
point value.
as a global alignment:
centered
as a horizontal alignment:
left, medium, right
as a vertical alignment:
top, middle, bottom, base_line
Text Menu 53
If the attribute is leading the value could assume any float number as
a point value.
If the attribute is kerning the value could assume any float number.
text kerning 7
If the attribute is position the value could assume any float number as
a point value.
54 Text Menu
Layer Window
With this group of commands you can directly access most of the features
from the IsoDraw Layer Menu.
Add Layer
The add layer command creates a new layer in the active document.
This layer automatically becomes the active layer, i.e. all elements which
you now generate will be assigned to this layer. The command will also
return a reference on the layer it has just created (see Layer - The Layer
Object).
Cut Layer
The cut layer command cuts the current layer and all its elements from
the currently active document and saves them in the program’s clipboard.
Layer Window 55
The cut layer can be retrieved from the clipboard at any time through the
command paste layer.
CUT LAYER
Copy Layer
With the copy layer command you can copy the active layer into the
program’s clipboard. The copied layer replaces the former content of the
clipboard. The copied layer can be retrieved from the clipboard at any time
through the command paste layer.
COPY LAYER
Paste Layer
PASTE LAYER
Duplicate Layer
With the duplicate layer command you can paste a copy of the
selected layer into the document. To a certain degree the command is a
combination of the commands "copy layer" and "paste layer". However the
selected layer is not saved to the clipboard. This has the advantage that
the old content of the clipboard is retained.
DUPLICATE LAYER
Delete Layer
56 Layer Window
DELETE LAYER
Activate Layer
The name parameter defines the name of the layer you wish to activate.
The name is case-sensitive!
With the delete all empty layers command you can automatically delete
all layers that contain no elements.
This command will move all selected elements to the active layer.
This command will move all selected text elements to the active layer.
Layer Window 57
58 Layer Window
Window Menu
With this group of commands you can directly access most of the features
from the IsoDraw Windows Menu. The commands "hide" and "show" will
not be recorded through the IsoDraw macro recorder.
Activate Window
The file parameter defines the name of a document window that should
be activated. The document has to be open.
Hide
HIDE window
palette
attribute_window
layer_window
fill_window
object_window
Window Menu 59
#close the palette
hide palette
Show
SHOW window
palette
attribute_window
layer_window
fill_window
object_window
Zoom
The zoom command sets the view size of the active IsoDraw document.
ZOOM size
The size parameter defines the view size for the active document as
string or float. Possible values are “page”, “extent” or any integer from 0.01
to 6400 to specify a scale %.
60 Window Menu
Palette Window
With this group of commands you can directly access most of the features
from the IsoDraw Palette Window.
Selecting Elements
To select elements with the IsoDraw Macro Language you can use the
following commands. Please refer to the Edit Menu chapter for additional
commands regarding the select elements topic or the Arrange section in
the Element Menu chapter.
Select Rectangle
The x1 and y1 parameters define the start point and the x2 and y2
parameters define the end point of the diagonal of the rectangle.
The optional parameter direct defines that elements within a group will
be selected even if the entire group is not within the selection rectangle.
The optional parameter add defines that this new selection will be added
to an existing selection, rather than replacing it. This is similar to using the
shift key when making multiple selections manually.
Palette Window 61
Select Polygon Points
The p1 parameter define the start point for the polygon as point.
The p1 parameter define the start point for the polygon as point.
The optional parameter direct defines that elements within a group will
be selected even if the entire group is not within the selection polygon.
The optional parameter add defines that this new selection will be added
to an existing selection, rather than replacing it. This is similar to using the
shift key when making multiple selections manually.
Select At
62 Palette Window
The select at command selects an element or just a part of an element
in the current document at the given coordinates.
You can put the optional parameters toggle, part, and direct in any
order. The parameter group is interacting with the direct option and
must be placed after it.
Transform Selection
Scale Selection
If you want to scale the elements that you have selected, use the scale
selection command.
The x and y parameters define the corner and therefore in what direction
you want to scale the elements.
The m_x and m_y parameters define the scaling of the x- and y-axis. These
parameters will multiply the axis. I.e. every number below one is for
Palette Window 63
shrinking the selection, one does no scaling at all and everything over one
is for enlarging the selection.
The optional parameter copy is for scaling and copying the object instead
of just scaling it.
If you want to scale patterns with reference to elements, use the optional
parameter no_elements.
If you want to scale only the elements, use the optional parameter
no_patterns.
Rotate Selection
The x and y parameters define the center point you want to rotate the
selected object around.
The optional parameter copy is for rotating and copying the object
instead of just rotating it.
If you want to rotate patterns with reference to elements, use the optional
parameter no_elements.
If you want to rotate only the elements, use the optional parameter
no_patterns.
Reflect Selection
64 Palette Window
The x and y parameters define the point where the center of reflection is
to lie.
The angle parameter defines the direction the reflection axis is located.
The optional parameter copy is for reflecting and copying the object
instead of just reflecting it.
If you want to reflect only the elements, use the optional parameter
no_patterns.
Create Parallels
The dist parameter defines the distance from the original element the
parallels will be drawn, in mm.
Set Transform
Palette Window 65
executed. Therefore you should always restore the transformation matrix
to normal with "restore transform" after using "set transform".
macro trans
define i as integer
define n as integer
define x as integer
define y as integer
set transform 300 200 0 0.5
for n = 0 to 75 step 15
set transform 0 0 n 1
for i = 90 to 360 step 90
if (i = 90)
x = 0
y = 200
end if
if (i = 180)
x = -200
y = 0
end if
if (i = 270)
x = 0
y = -200
end if
if (i = 360)
x = 200
y = 0
end if
set transform x y i 1
create line 0 0 100
0
restore transform
end for
restore transform
end for
66 Palette Window
restore transform
end macro
Restore Transform
RESTORE TRANSFORM
Absolute
If the absolute mode is set all transformation matrices are ignored. All
coordinates are interpreted as absolute coordinates until the absolute
mode is turned off.
ABSOLUTE on
ABSOLUTE off
Creating Elements
All create commands (ellipse, line, rectangle ...) return a reference on the
created element. The properties of this element object can be queried and
set (see Element - The Element Object).
Create Line
Palette Window 67
CREATE LINE x1 y1 x2 y2
The parameters x1 and y1 define the starting point of the line and the
parameters x2 and y2 define the endpoint of the line.
The append line segment command appends a line to the last line
created by the "create line" command or by an "append line command". To
append a line for the first time there has to be a line created by the "create
line" command!
The start point for the appended line is the end point of the line plotted
by the "create line" command resp. the "append line segment" command.
The x and y parameters define the end point of the line segment.
Macro house_of_nicholas
End Macro
Create Ellipse
68 Palette Window
The create ellipse command plots an ellipse.
The optional parameter depth describes the depth of the inner thread. If
the parameter is set to -1 or missing the inner thread will be completely
filled.
Palette Window 69
The angle parameter defines the ellipse angle.
The optional parameter depth describes the depth of the outer thread. If
the parameter is missing the depth of the outer thread will be set to 0.
Create Callout
The parameter style defines which style is used for the callout. The given
style must be defined before using it for the command. The name of the
style is case sensitive.
The parameters x1 and y1 define the starting point of the callout and the
parameters x2 and y2 define the end point of the callout. The callout
number will appear at the coordinates of the end point. To create a callout
without a line the start and end coordinates have to be identical.
The optional parameter notation is needed for callout styles with the
scheme set to “No Scheme”. In these cases the notation will be used as the
callout text. If the scheme of the callout style is not set to “No scheme”
the notation will be ignored.
Create Rectangle
70 Palette Window
The create rectangle command plots a rectangle in active
document.
The parameters sp_x and sp_y define the starting point of the rectangle.
The parameter s lr_x and lr_y define the lower right corner of the
rectangle.
The parameter ep_x and ep_y define the end point of the rectangle.
The parameter ul_x and ul_y define the upper left corner of the
rectangle.
The optional parameter rounded, angle and value are used for
defining the rounded corners of the retangle. Where “rounded” is for
initiating, “value” for the ellipse value and “angle” is for the ellipse angle
of the rounding.
#a normal rectangle
create rectangle 236.881 222.495 236 132.681 314
87 314 177
Create Polygon
The corners parameter defines how many corners (or sides) the polygon
is going to have.
Because a polygon behaves like an ellipse while being drawn, you also
have to define a radius, an angle as the ellipse angle and a value as
a ellipse value (see also create ellipse).
Palette Window 71
#drawing an octagon
create polygon 381.838 212.288 8 65 300 35.264
The point1 parameter defines with its x- and y-coordinates the starting
point of the bézier curve and the starting point of the first handle.
The point2 parameter defines with its x- and y-coordinates the end
point of the bézier curve.
create bezier curve 100 100 150 100 150 200 200
200
72 Palette Window
The start point for the appended bézier curve is the end point of the bézier
curve created by the "create bezier curve" command resp. the "append
bezier segment" command.
The point parameter defines with its x- and y-coordinates the end point
of the bézier curve.
create bezier curve 100 100 150 100 150 200 200
200
append bezier segment 250 200 250 100 300 100
append bezier segment 350 100 350 200 400 200
append bezier segment 450 200 450 100 500 100
Create Text
The x and y parameters define the lower left corner of the text box.
Change Text At
Palette Window 73
The Change Text At command changes a text element at a specific
position on the current document.
The x and y parameters define the position of the text element that will
be changed as float.
Set Ellipsevalues
The angle parameter defines the desired ellipse angle between 1 and 90
as float.
Set Ellipsevalues 45
74 Palette Window
Attribute Window
With this group of commands you can directly access most of the features
from the IsoDraw Attribute Window.
Pens
Add Pen
With the add pen command you can create a new pen. The new pen will
be added to the currently active document and inherit the attributes of
the currently active pen. The new pen will be set to active.
The name parameter defines the name of the pen after creation. If there
is already a pen with that name the macro command can not be executed.
It is forbidden to use the following characters within a pen name:
/ ^ ! < ( :
The optional width parameter defines the width of the pen in mm.
Delete Pen
The name parameter defines the name of the pen that is going to be
deleted. If no pen with that name exists the command can not be
executed.
Attribute Window 75
The substName parameter defines the name of the pen that is
substituted. If no pen with that name exists the command can not be
executed.
The name parameter defines the name of the pen that is going to be set
as active.
Set Lineoptions
The set lineoptions command lets you change the print options for
particular elements. If elements are selected when executing the
command the options are changed for these elements. If no elements are
selected when executing this command the print options for the whole
active document are changed. Every element created after executing the
command will then have these options.
The corners option defines the type of line corners. This option is only
significant for Bézier paths with corner points.
76 Attribute Window
set lineoptions 2 0 0 4
Styles
Add Style
The add style command creates a new style. This new style will be
added to the currently active document. If there is already an active style
the added style will inherit the attributes of the active style. After the new
style is added to the document this style will be the new active style, used
for all following elements.
The name parameter defines the name of the new style. If there is already
a style with that name the command can not be executed. The following
characters are forbidden within a style name:
/ ^ ! < ( :
Delete Style
This command deletes an existing style out of the style list of the currently
active document.
Attribute Window 77
The name parameter defines the name of the style that is going to be
deleted. If no style with that name exists the command can not be
executed.
The name parameter defines the name of the style that is going to be set
as active.
Shadows
Add Shadow
With the add shadow command you can create a new shadow. The new
shadow will be added into the currently active document and inherit the
attributes of the currently active shadow. The new shadow will be set to
active.
The name parameter defines the name of the shadow after creation. If
there is already a shadow with that name the macro command can not be
executed. It is forbidden to use the following characters within a shadow
name:
/ ^ ! < ( :
78 Attribute Window
add shadow "myShadow"
Delete Shadow
This command deletes an existing shadow out of the shadow list of the
currently active document.
The name parameter defines the name of the shadow that is going to be
deleted. If no shadow with that name exists the command can not be
executed.
The name parameter defines the name of the shadow that is going to be
set as active.
Grids
Add Grid
The add grid command creates a new grid and adds it to the currently
active document.
Attribute Window 79
If there is no document open, the new grid will be a new standard
grid available in all new documents.
The name parameter defines the name of the grid after creation. If there
is already a grid with that name the macro command can not be executed.
It is forbidden to use the following characters within a macro name:
/ ^ ! < ( :
The optional z_angle and x_angle parameters define the z- and x-axis.
The angles can range from 0° to 90° but totaled they should not exceed
90° (included). The y-axis is not specified as it will always be vertical.
If the angle parameters are missing the plane angle of the first two
selected lines is taken to build the grid. If only one line is selected the grid
will be build as isometric-grid (30° - 30°).
macro CreateGridArray
Define a as Integer
Define b as Integer
For a=10 to 70 step 10
For b=10 to 80-a step 10
Add Grid "[ "+a+" - "+b+ " ]" a b
End For
End For
End macro
Delete Grid
This command deletes an existing grid out of the grid list of the currently
active document.
The name parameter defines the name of the grid that is going to be
deleted. If no grid with that name exists the command can not be
executed.
80 Attribute Window
The substName parameter defines the name of the grid that is
substituted. If no grid with that name exists the command can not be
executed.
Formats
Add Format
With the add format command you can create a new format. The new
format will be added into the currently active document and inherit the
attributes of the currently active format. The new format will be set to
active.
The name parameter defines the name of the format after creation. If
there is already a format with that name the macro command can not be
executed. It is forbidden to use the following characters within a format
name:
/ ^ ! < ( :
Delete Format
This command deletes an existing format out of the format list of the
currently active document.
The name parameter defines the name of the format that is going to be
deleted. If no format with that name exists the command can not be
executed.
Attribute Window 81
The substName parameter defines the name of the format that is
substituted. If no format with that name exists the command can not be
executed.
The name parameter defines the name of the format that is going to be
set as active.
Viewports
Add Viewport
With the add viewport command you can create a new viewport. The
new viewport will be added into the currently active document and inherit
the attributes of the currently active viewport. The new viewport will be
set to active.
The name parameter defines the name of the viewport after creation. If
there is already a viewport with that name the macro command can not
be executed. It is forbidden to use the following characters within a
viewport name:
/ ^ ! < ( :
Delete Viewport
82 Attribute Window
This command deletes an existing viewport out of the viewport list of the
currently active document.
The name parameter defines the name of the viewport that is going to be
deleted. If no viewport with that name exists the command can not be
executed.
Execute Viewport
With the execute viewport command you can jump to a given viewport.
The path parameter must have the path and name of an existing IsoDraw
or CGM File. To activate the currently active file the path parameter can
be an empty string.
The name parameter defines the name of an existing viewport of the file
given in the path parameter resp. the currently active file. The name
parameter is case sensitive.
execute viewport
"c:\data\illustration\Mz445_ttr.iso" "seat"
Add Layerstatus
Attribute Window 83
Add Layerstatus "My_Layer" to "My_Viewport"
Remove Layerstatus
Callouts
Add Callout_Style
With the add callout_style command you can create a new callout
style. The new callout style will be added into the currently active
document and inherit the attributes of the currently active callout style.
The new callout style will be set to active.
The name parameter defines the name of the callout style after creation.
If there is already a callout style with that name the macro command can
not be executed. It is forbidden to use the following characters within a
callout style name:
/ ^ ! < ( :
Delete Callout_Style
84 Attribute Window
This command deletes an existing callout style out of the callouts list of
the currently active document.
The name parameter defines the name of the format that is going to be
deleted. If no callout style with that name exists the command can not be
executed.
The optional substName parameter defines the name of the callout style
that is substituted. If no callout style with that name exists the command
can not be executed.
Renumber Callouts
Renumber Callouts
Attribute Window 85
86 Attribute Window
Fill Window
With this group of commands you can directly access most of the features
from the IsoDraw Fill Window.
Colors
Add Color
With the add color command you can create a new color. The new
color will be added to the currently open document. The new color will be
set to active.
The name parameter defines the name of the color after creation. If there
is already a color with that name the macro command can not be
executed. Furthermore, it is forbidden to use the following characters
within a color name:
/ ^ ! < ( :
End Macro
Delete Color
Fill Window 87
This command deletes an existing color out of the color list of the
currently active document.
The name parameter defines the name of the color that is going to be
deleted. If no color with that name exists the command can not be
executed.
The substName parameter defines the name of the color that is used as
substitution. If no color with that name exists the command can not be
executed.
88 Fill Window
3D Commands
The 3D commands can only be executed if the current active document is
opened in 3D mode, otherwise an error message will appear.
3D View
3D VIEW view
The view parameter defines the camera angle as integer. Allowed values
are:
X View X
Y View Y
Z View Z
Isometric_top Isometric view top
Isometric_bottom Isometric view bottom
Dimetric_1 Dimetric view 1
Dimetric_2 Dimetric view 2
Dimetric_3 Dimetric view 3
Dimetric_4 Dimetric view 4
Trimetric Trimetric view
Perspective Perspective view
3D View Dimetric_2
3D SetView
3D SETVIEW view
3D Commands 89
The view parameter defines the camera angle as integer. Allowed values
are 900 for “View X”, 901 for “View Y”, 902 for “View Z”, 903 for “Isometric
view top”, 904 for “Isometric view bottom”, 905 for “Dimetric View 1”, 906
for “Dimetric View 2”, 907 for “Dimetric View 3”, 908 for “Dimetric View 4”,
909 for “Trimetric View” and 910 for “Perspective View”.
3D SetView 903
3D Project
3D PROJECT alt
The alt parameter defines if the 3D mode should be exited after the
projection is created in a new IsoDraw 2D document window. Allowed
values are 0 for “creating the projection in a new document followed by
activating the 3D window again” and 1 for “creating the projection in a
new document followed by closing the 3D window”.
3D Project 1
3D Center
The 3D Center command allows you to align all the assemblies of the
drawing such that the coordinate origin is at the center point of all
assemblies.
3D CENTER
3D ZoomExtent
90 3D Commands
The 3D ZoomExtent command displays the entire drawing on the
screen.
3D ZOOMEXTENT
3D HLRMode
This command toggles the view between hidden lines shown and hidden
lines removed.
3D HLRMODE mode
The mode parameter defines if the hidden lines are shown. Allowed values
are 15 for “hidden lines shown” and 16 for “hidden lines removed”.
3D HLRMode 15
3D Mode
3D Mode mode
The mode parameter defines the view mode displayed. Allowed values are
“wireframe”, “HLR”, “faced” and “shaded”.
3D HLRMode wireframe
3D Explosion
3D Commands 91
The 3D Explosion command gives you the means to automatically
explode the components of a larger assembly unit along a specific axis.
The direction parameter defines the axis and the direction you wish to
explode the assemblies. Allowed values are 1 for “direction: positive, axis:
x”, 2 for “direction: both, axis: x”, 3 for “direction: negative, axis: x”, 4 for
“direction: positive, axis: y”, 5 for “direction: both, axis: y”, 6 for “direction:
negative, axis: y”, 7 for “direction: positive, axis: z”, 8 for “direction: both,
axis: z”, 9 for “direction: negative, axis: free”, 10 for “direction: positive,
axis: free”, 11 for “direction: both, axis: z” and 12 for “direction: negative,
axis: free”.
The 3d-point parameter comes to play if the user has selected a “free”
axis for explosion. The 3d-point will define the free-axis as point3.
3D Move
3D MOVE 3d-point
The 3d-point parameter defines along which axis the drawing should be
moved as point3.
3D Axis
92 3D Commands
3D Axis 3d-point
The 3d-point parameter defines a point through which the axis should
be created. The string “off” may also be used to remove a 3D Select axis.
3D Transform
3D TRANSFORM 3d-matrix
3D Reset
3D Reset
3D SetDist
3D SETDIST value
3D SetDist 25.5
3D Commands 93
3D Hole rectangle
The point parameters define the start and end points of the rectangle as
float.
94 3D Commands
The point parameters define points on the free path as float. Many
points can be listed for a single 3D Hole polygon points command.
3D Commands 95
96 3D Commands
Further Macro Commands
This chapter contains additional commands available within the IsoDraw
macro language.
FWrite
The fwrite command writes a string with a new line character to the
end of a text file. If the file doesn’t exist it will be created.
The message parameter defines the message written into the file defined
by the path parameter.
FNew
The fnew command creates a new text file with the name a location
specified. If the file already exists it will be overwritten.
The 8_bit optional parameter defines that the file will be created as a 8-
Bit ASCII text file. By default the file is created as a UNICODE text file.
Log
Within the IsoDraw working folder you can find a file named “macro.log”.
All errors and warnings which occur during the execution of a macro are
written into that file by the IsoDraw Macro Language. With the command
log you can write your own messages into the file.
The message parameter defines the message which is written into the
macro.log file.
Menu
The command searches for the first menu command beginning with the
complete search-string. Because menu commands differ from language
to language all macros using the menu command are language specific.
The menu command can be used to start a plugin (like IsoCompose) and
can also reach all commands from the popup menus.
You can not use the menu command to open any item from the help-
menu and you only have access to menu commands that are available at
the time the command is executed.
Debug Step
DEBUG STEP on
macro debug
debug step on
#first create a line by a macro command
create line 100 100 200 100
#second append line segments
append line segment 200 200
append line segment 100 100
append line segment 100 200
append line segment 200 200
append line segment 150 250
append line segment 100 200
append line segment 200 100
debug step off
end macro
Debug Commands
DEBUG COMMANDS
DEBUG RESET
Debug Stack
The debug stack command opens a window listing the “call stack” of
.nested sub-macros.
DEBUG STACK
Debug Locals
The debug locals command opens a window listing all defined local
variables.
DEBUG LOCALS
Debug Globals
The debug globals command opens a window listing all defined global
variables.
DEBUG GLOBALS
Wait Timer
With the wait timer command you can stop the application for a given
time period. The current window will be redrawn beforehand.
The ticks parameter defines how long the application will be stopped as
an integer. One tick is 1/60 of a second.
The param parameter defines the command line parameters for the
plugin as string.
Please find below a sample with double-quote syntax. The target format
is SVG in this case. Note that the source and the destination folders must
exist and check the name of the batch tool in the extensions folder.
In this sample the backslash character is used for the Line Continuation.
Next, we have a sample with mixed quote characters. The target format is
CGM . We call a macro ‘rotate90’ on each illustration.
If no file format code is specified IsoDraw will use its standard format.
With the increase text elements command you can increase the
numeric values within selected text elements and callouts by the value
specified.
With the decrease text elements command you can decrease the
numeric values within selected text elements and callouts by the value
specified.
Message
MESSAGE "text"
The text parameter defines the message which is shown in the message
box.
message "Ready!"
Get
The get command opens a dialog window to get a value from the user.
The input_type parameter defines the input value type. The parameter
may have the following values assigned:
integer
for an integer value
float
for a float value
string
for a string value
boolean
for a boolean value
Wait Mouseclick
mouseEvent.click
The click property returns which mouse button has been clicked.
Returning 0 means “no button pressed”, 1 means “left mouse button
pressed” and 2 means “right mouse button pressed”.
message myME.click
mouseEvent.ptPix
message myME.ptPix.x
message myME.ptPix.y
mouseEvent.ptPixGrid
message myME.ptPixGrid.x
message myME.ptPixGrid.y
The ptMM property returns the mouse position of the page coordinates in
millimeters. The point of origin is the lower left corner of the active page.
message myME.ptMM.x
message myME.ptMM.y
mouseEvent.ptMMGrid
The ptMM property returns the mouse position, in millimeters of the page
coordinates depending on element and grid magnetism. The point of
origin is the lower left corner of the active page.
message myME.ptMMGrid.x
message myME.ptMMGrid.y
mouseEvent.modifiers
message myME.modifiers
define me as MouseEvent
define pt as Point
define ms as String
me = Wait MouseClick
if (me.click = 0) then
Message "Aborted"
else
pt = me.ptPix
ms = " at pixel coordinates"
ms = ms + pt.x + "," + pt.y
If (me.click = 1) Then
ms = "Left click" + ms
Else
ms = "Right click" + ms
End if
If (me.modifiers = 512) Then
ms = ms + " with Shift-Key"
End if
If (me.modifiers = 256) Then
ms = ms + " with Ctrl-Key"
End if
If (me.modifiers = 2048) Then
ms = ms + " with Alt-Key"
End if
pt = me.ptMMGrid
Create Text pt.x pt.y ms
End if
End macro
Beep
Beep
Trigonometric Functions
Macro waveplot
define i as integer
create line 0 100 0 100
for i=1 to 720
append line segment i*0.82
sin(i)*100+100
end for
create line 0 200 0 200
for i=1 to 720
append line segment i*0.82
cos(i)*100+100
end for
end Macro
sqrt (<source>)
square root
ln (<source>)
natural logarithm
exp (<source>)
exponential function
Functions 107
abs (<source>)
absolute value
macro logplot
define i as integer
for i=1 to 300
create line i 0 i ln(i)*20
end for
end macro
Random Function
The rand() function will return a random number between 0 and the
given argument.
The random generator must be initialized with the command
randomize. With no parameter given the current time initiates the
function; with a parameter given for a repeatable randomized sequence.
macro modernArt
define i as integer
randomize
for i=0 to 100
create line rand(600) rand(420)
rand(600) rand(420)
end for
end macro
String Functions
There are some special string functions in the IsoDraw Macro Language:
eval (<source>)
Evaluates a sting as a mathematical function.
lower (<source>)
Converts the string to lowercase.
upper (<source>)
Converts the string to uppercase.
108 Functions
len (<source>)
Returns the length of a string.
left (<source>,<count>)
Returns the string’s left most characters equal to the count.
right (<source>,<count>)
Returns the string’s right most characters equal to the count.
mid (<source>,<start>,<count>)
Returns the string’s characters from the given start to the right,
equal to the count.
find (<source>,<search>,<start>)
Returns the character position of the search term. Only searches to
the right of the start term.
stripExt (<source>)
Returns the string without an extension.
getExt (<source>)
Returns the string’s extension.
stripFileName (<source>)
Returns the string without the file name (i.e. returns the path).
getFileName (<source>)
Returns the string’s file name and extension (i.e. without the path)
Functions 109
Macro Path, Name and Extension Info
New
Save "C:\Program Files\ITEDO
Software\NameSample.iso"
message "the file's full path is: " +
$Newline + activeDoc.path
message "the file's full name is: " +
$Newline + activeDoc.name
message "the file's name minus extension
is: " + $Newline + stripExt(activeDoc.name)
message "the file's extension is: " +
$Newline + getExt(activeDoc.name)
message "the file's path without its name
is: " + $Newline + stripFileName(activeDoc.path)
End Macro
isAlpha (<source>)
Returns if the string is composed entirely of alpha characters as
boolean.
isDigit (<source>)
Returns if the string is composed entirely of digits as boolean.
isLower (<source>)
Returns if the string is composed entirely of lower case alpha
characters as boolean.
isUpper (<source>)
Returns if the string is composed entirely of upper case alpha
characters as boolean.
isSpace (<source>)
Returns if the string is composed entirely of spaces as boolean.
isAscii (<source>)
Returns if the string consists entirely of characters found in the first
128 from the ASCII character map as boolean.
isControl (<source>)
Returns is the string consists entirely of control characters (such as
TAB) as boolean.
110 Functions
isPrintable (<source>)
Returns is the string consists entirely of printable characters (i.e.
without control characters) as boolean.
isNumerical (<source>)
Returns if the string is numerical as boolean. This differs from
isDigit (e.g. -99.9 is not true as isDigit, but is true as isNumberical).
code (<source>)
Returns the first character’s code from the Ascii character map as
integer.
char (<source>)
Returns the character for the character from the Ascii character
map for the given integer value.
macro stringFunctions
define txt as string
txt = "IsoDraw Macro Language"
message txt
message len(txt)
message upper(txt)
message lower(txt)
end macro
Time Functions
date ()
Returns the date as string
time (<seconds>)
Returns the time as string. Use the optional “seconds” parameter to
determine if seconds are given. Enter true to include seconds and false
to exclude them.
Functions 111
ticks ()
Returns the time in ticks as string. There are 60 ticks per second.
Negation
The not() function is for the logical negation. The result is either true or
false.
Exists
Returns TRUE if the give expression is true within the context of the macro
and the defined document, layer or element does exist.
exists (expression)
112 Functions
# some examples:
if (exists (activeDoc.firstSelectedElement) =
false) then
message "No element selected!"
if (exists
(activeDoc.layers["Background"].firstChild) =
false) then
message "Background layer is empty!"
if (exists (activeDoc.firstSlectedElement.info)
= false) then
message "The first selected element has no
object info!"
Macro AddCustomPen
Define penName as String
penName = Get String "Name of your new Pen?"
if (exists (activeDoc.Pens[penName]) =
false) then
Add Pen penName
else
Message "Pen " + penName + " already
exists!"
end if
end Macro
Functions 113
Return
114 Functions
Simple Data Types
The IsoDraw Macro Language provides four different simple data types.
Integers
Integers are whole numbers, like 2, 4 and 357. The range of an integer
extends from (-2,147,483,648) through 2,147,483,647. Negative values
have to be put in brackets.
Floating-Point Numbers
Strings
String literals are delimited either with single(’) or double (") quotes in
IsoDraw macros:
'Mo Szyslak'
"Julius Hibbert"
Quotes of the same type have to be doubled for not terminating the
string:
Point
A point owns two float properties which define the x- and y-coordinates
of the point.
Point3
The point3 type defines a three-dimensional point with its x-, y- and z-
coordinates. These properties are float literals.
Rectangle
RGBColor
CMYKColor
ColorSpec
The ColorSpec data type is an either...or data type. This means that the
data type could assume three different states. Depending on the state of
the data type, it owns two or three properties.
The first and only common to all three different states of the ColorSpec
data type is the type property. This property contains the string value
"cmykValues", "rgbValues" or "colorRef".
If the value type is "cmykValues" the ColorSpec data type owns a second
property called cmyk which is a CMYKColor data type.
If the value type is "rgbValues" the ColorSpec data type owns a second
property called rgb which is an RGBColor data type.
If the value type is "colorRef" the ColorSpec data type owns another two
properties. One is a string and called color and one is a float and called
tone. The color property contains the name of the color the data type is
referencing. Every color defined in IsoDraw is allowed. The tone property
defines the modification of intensity as a float (0 to 1) of the color defined
by the color property.
Fill
The fill data type owns four properties. The first one is a string which
defines the type of the fill. The allowed values for type are "no_fill",
"hatching", "pattern" and "color".
myFill.type = "pattern"
myFill.colSpec.rgb.blue = 29
The third property defines the hatching used. Values allowed for this
property are the names of all existing hatchings as string.
myFill.hatching = "Aluminium"
The fourth property is used for defining the type of pattern. Allowed
values for that property are the names of all existing patterns as string.
Mouse Event
The mouse event returns information about the mouse behavior of the
user, e.g. which mouse button has been clicked. (see Wait Mouseclick for
more details)
#or
activeDoc.name = "a new document"
It is assumed that myDoc has already been defined as a document and set
as the activeDoc for the following samples.
document.name
myDoc.name = "myNewDocument"
document.path
myDoc.path = "c:\temp\doc_01.iso"
document.penCount
Returns the number of the pens as integer. This property is read only.
message myDoc.penCount
document.active_Pen
myDoc.active_pen = "Thick"
document.styleCount
Returns the number of the styles as integer. This property is read only.
message myDoc.styleCount
myDoc.active_style = "Solid"
document.shadowCount
message myDoc.shadowCount
document.active_shadow
document.gridCount
message myDoc.gridCount
document.active_grid
myDoc.active_grid = "Isometric"
document.formatCount
Returns the number of text formats as integer. This property is read only.
message myDoc.formatCount
document.active_textFormat
Returns and sets the name of the active text format as string.
myDoc.active_textFormat = "Normal"
message myDoc.viewportCount
document.viewports[ ]
This property gives access to all viewport attributes but it can not be used
directly. It is assumed that myDoc has already been defined as a
document and set as the activeDoc for the following samples.
document.viewports[].name
Returns and sets the viewport name as string.
myDoc.viewports[1].name = "test"
document.viewports[].Id
Returns the viewport ID as string. This property is read only.
message myDoc.viewports[1].Id
document.viewports[].Rectangle
Returns and sets the viewport rectangle as rectangle.
myDoc.viewports[1].rectangle.bottom = 500
myDoc.viewports[1].rectangle.left = 135
myDoc.viewports[1].rectangle.right = 200
myDoc.viewports[1].rectangle.top = 650
document.viewports[].LayerCount
Returns the number of layers in a viewport as integer. This property is read
only.
message myDoc.viewports[1].LayerCount
document.viewports[ ].Layers[]
This property gives access to layer attributes within a viewport but it can
not be used directly. It is assumed that myDoc has already been defined
as a document and set as the activeDoc for the following samples.
document.viewports[].Layer[].Name
Returns and sets the name of a layer within a viewport as string.
document.viewports[].Layers[].locked
Returns and sets the locked state of a layer within a viewport as boolean.
myDoc.viewports[1].Layers[1].locked = true
document.viewports[].Layers[].protected
Returns and sets the protected state of a layer within a viewport as
boolean.
myDoc.viewports[1].Layers[1].protected = true
document.viewports[].Layers[].active
Returns and sets the active state of a layer within a viewport as boolean.
myDoc.viewports[1].Layers[1].active = true
document.viewports[].Layers[].printable
Returns and sets the printable state of a layer within a viewport as
boolean.
myDoc.viewports[1].Layers[1].printable = true
document.viewports[].Layers[].exportable
Returns and sets the exportable state of a layer within a viewport as
boolean.
myDoc.viewports[1].Layers[1].exportable = true
document.viewports[].Layers[].visible
Returns and sets the visible state of a layer within a viewport as boolean.
myDoc.viewports[1].Layers[1].visible = true
document.viewports[].Layers[].useColor
Returns and sets the use of color property of a layer within a viewport as
boolean.
myDoc.viewports[1].Layers[1].useColor = true
document.calloutCount
message myDoc.calloutCount
document.active_callout
Returns and sets the name of the active callout style as string.
myDoc.active_calloutstyle = "Normal"
document.layerCount
message myDoc.layerCount
document.layers[ ]
Gives access to all layer attributes but can not be reached directly. (see
Layer - The Layer Object for more details)
myDoc.layers[1].name = "myLayer"
document.selectedElements
message myDoc.selectedElements
document.firstSelectedElement
document.selectedParts
message myDoc.selectedParts
document.modified
message myDoc.modified
document.grid
This property gives access to all grid attributes but it can not be used
directly. It is assumed that myDoc has already been defined as a
document and set as the activeDoc for the following samples.
document.grid.gridSize
Returns and sets the grid size property as float.
myDoc.grid.gridSize = 20
document.grid.radius
myDoc.grid.radius = 5
document.grid.elementMagnet
Returns and sets the magnetic elements property as boolean.
myDoc.grid.elementMagnet = true
document.grid.gridMagnet
Returns and sets the magnetic grid points property as boolean.
myDoc.grid.gridMagnet = true
document.grid.showGrid
Returns and sets the show grid property as boolean.
myDoc.grid.showGrid = true
document.grid.showDim
Returns and sets the show dimensions property as boolean.
myDoc.grid.showDim = true
document.grid.constrain
Returns and sets the align to grid property as boolean.
myDoc.grid.constrain = true
document.grid.gridInFront
Returns and sets the grid in front property as boolean.
myDoc.grid.gridInFront = true
document.grid.noFShortInIso
Returns and sets the no isometric foreshortening property as boolean.
myDoc.grid.noFShortInIso = true
document.grid.gridColor
Returns and sets the color property as RGBColor.
myDoc.grid.gridColor.red = 50
myDoc.grid.gridColor.green = 150
document.grid.firstSelColor
Returns and sets the first color property as RGBColor.
myDoc.grid.firstSelColor.red = 10
myDoc.grid.firstSelColor.green = 160
myDoc.grid.firstSelColor.blue = 140
document.grid.secondSelColor
Returns and sets the second color property as RGBColor.
myDoc.grid.secondSelColor.red = 75
myDoc.grid.secondSelColor.green = 30
myDoc.grid.secondSelColor.blue = 85
document.window
This property gives access to all window attributes but it can not be used
directly. It is assumed that myDoc has already been defined as a document
and set as the activeDoc for the following samples.
document.window.pageX
Returns and sets the window x-cords property as float.
myDoc.window.pageX = 200
document.window.pageY
Returns and sets the window y-cords property as float.
myDoc.window.pageY = 300
document.window.overlapX
Returns and sets the print overlap x-cords property as float.
myDoc.window.overlapX = 10
document.window.overlapY
Returns and sets the print overlap y-cords property as float.
myDoc.window.overlapY = 10
document.window.scale
Returns and sets the window view size (zoom) property as float.
myDoc.window.scale = 10
document.window.dimScale
Returns and sets the dimension scaling property as float.
myDoc.window.dimScale = 3
document.window.preview
Returns and sets the objects preview property as integer. The allowed
values are:
0 “no preview”
1 “a preview”
2 “visible hotspots”
4 “visible objects”
myDoc.window.preview = 6
document.window.is3D
Returns the 3D property as boolean. This property is read only.
message myDoc.window.is3D
document.window.curSystem
Returns and sets the current unit system property as string. Allowed
values are "mm", "in" and "pt".
myDoc.window.curSystem = "mm"
document.shadow
document.shadow.shadowWidth
Returns and sets the shadow width property as float.
myDoc.shadow.shadowWidth = 5
document.shadow.shadowFactor
Returns and sets the shadow factor property as float.
myDoc.shadow.shadowFactor = 2
document.thread
This property gives access to all thread attributes but it can not be used
directly. It is assumed that myDoc has already been defined as a document
and set as the activeDoc for the following samples.
document.thread.inner.upTo1
Returns and sets the first "inner thread up to" property as float.
myDoc.thread.inner.upTo1 = 20
document.thread.inner.upTo2
Returns and sets the second "inner thread up to" property as float.
myDoc.thread.inner.upTo2 = 40
document.thread.inner.size1
Returns and sets the first inner thread distance property as float.
myDoc.thread.inner.size1 = 2.5
document.thread.inner.size2
Returns and sets the second inner thread distance property as float.
myDoc.thread.inner.size2 = 4
document.thread.inner.size3
Returns and sets the third inner thread distance property as float.
document.thread.outer.upTo1
Returns and sets the first "outer thread up to" property as float.
myDoc.thread.outer.upTo1 = 20
document.thread.outer.upTo2
Returns and sets the second "outer thread up to" property as float.
myDoc.thread.outer.upTo2 = 40
document.thread.outer.size1
Returns and sets the first outer thread distance property as float.
myDoc.thread.outer.size1 = 2.5
document.thread.outer.size2
Returns and sets the second outer thread distance property as float.
myDoc.thread.outer.size2 = 4
document.thread.outer.size3
Returns and sets the third outer thread distance property as float.
myDoc.thread.outer.size3 = 5.5
document.thickthin
This property gives access to all thick/thin attributes but it can not be used
directly. It is assumed that myDoc has already been defined as a document
and set as the activeDoc for the following samples.
document.thickthin.useThickThin
Returns and sets the "use thick thin technique" property as boolean.
myDoc.thickthin.useThickThin = true
document.thickthin.thickPen
Returns and sets the thick pen property as string. The name of every
exiting pen is an allowed value.
myDoc.thickthin.thickPen = "Thick"
myDoc.thickthin.thinPen = "Thin"
document.thickthin.useEllipsePens
Returns and sets the "specify pens for ellipses and threads" property as
boolean.
myDoc.thickthin.useEllipsePens = true
document.thickthin.thick1
Returns and sets the first thick pen property as string. The name of every
exiting pen is an allowed value.
myDoc.thickthin.thick1 = "Thick"
document.thickthin.thin1
Returns and sets the first thin pen property as string. The name of every
exiting pen is an allowed value.
myDoc.thickthin.thin1 = "Thin"
document.thickthin.thick2
Returns and sets the second thick pen property as string. The name of
every exiting pen is an allowed value.
myDoc.thickthin.thick2 = "Thick"
document.thickthin.thin2
Returns and sets the second thin pen property as string. The name of every
exiting pen is an allowed value.
myDoc.thickthin.thin2 = "Thin"
document.thickthin.thick3
Returns and sets the third thick pen property as string. The name of every
exiting pen is an allowed value.
myDoc.thickthin.thick3 = "Thick"
document.thickthin.thin3
myDoc.thickthin.thin3 = "Thin"
document.thickthin.upto1
Returns and sets the first up to property as float.
myDoc.thickthin.upto1 = 20
document.thickthin.upto2
Returns and sets the second up to property as float.
myDoc.thickthin.upto2 = 40
document.background
This property gives access to all background attributes but it can not be
used directly. It is assumed that myDoc has already been defined as a
document and set as the activeDoc for the following samples.
document.background.inColor
Returns and sets the “in color” property as boolean.
myDoc.background.inColor = true
document.background.intensity
Returns and sets the intensity property as float. The property range is from
0 to 100.
myDoc.background.intensity = 50
document.background.color
Returns and sets the screen color property as RGBColor.
document.lineOptions
This property gives access to all line option attributes but it can not be
used directly. It is assumed that myDoc has already been defined as a
document and set as the activeDoc for the following samples.
myDoc.lineOptions.lineCap = 1
document.lineOptions.lineJoin
Returns and sets the line option corners property as integer. Allowed
values are 0 for “mitered”, 1 for “rounded” and 2 for “bevel”.
myDoc.lineOptions.lineJoin = 2
document.lineOptions.miterLimit
Returns and sets the miter limit property as integer.
myDoc.lineOptions.miterLimit = 4
document.lineOptions.overPrint
Returns and sets the overprint property as integer. Allowed values are 0
for “none”, 1 for “stroke”, 2 for “fill” and 3 for “stroke and fill”.
myDoc.lineOptions.overPrint = 2
document.simpleEllipsePrinting
This property sets and returns the simple ellipse printing as boolean.
myDoc.simpleEllipsePrinting = true
document.colorCount
message myDoc.colorCount
document.hatchingCount
message myDoc.hatchingCount
document.patternCount
message myDoc.patternCount
All create commands (ellipse, line, rectangle ...) return a reference on the
created element. The properties of this element object can be queried and
set.
myElem.line.segments[1].pen = "Thick"
myElem.line.segments[2].pen = "Medium"
myElem.line.segments[3].pen = "Thin"
End Macro
It is assumed that myElem has already been defined as an element for the
following samples.
element.element_id
message myElem.element_id
element.type
message myElem.type
element.locked
Returns and sets the locked state of the element as integer. Allowed values
are 0 for “unlocked” and 1 for “locked”.
myElem.locked = 0
element.mask
Returns the masked state of the element as boolean. This property is read
only.
message myElem.mask
element.box
message myElem.box.top
message myElem.box.left
message myElem.box.bottom
message myElem.box.right
element.firstChild
element.lastChild
This will return the last element located within a group. The returned data
type is element. This property is read only.
element.previousSibling
This will return the previous element located within a group or on a layer.
The returned data type is element. This property is read only.
This will return the next element located within a group or on a layer. The
returned data type is element. This property is read only.
element.parent
element.layer
Returns the layer which the element is located on as layer. This property
is read only.
macro getLayerName
define el as element
select all
el = activeDoc.firstSelectedElement
message el.layer.name
end macro
element.selected
Returns the selected state of the element as integer. This property is read
only. 0 means “not selected” and 1 means “selected”.
message myElem.selected
element.nextSelectedElement
Macro MakeHotspots
Define el as Element
Select if Type is equal to "Text"
el = activeDoc.firstSelectedElement
while (Exists (el) = true )
Create Object_Info el
el.info.hotspot = "region"
el = el.nextSelectedElement
end while
End Macro
element.lineCap
Returns and sets the ends property of the element as integer. Allowed
values are 0 for “flat”, 1 for “round” and 2 for “square”.
myElem.lineCap = 1
Returns and sets the corners property of the element as integer. Allowed
values are 0 for “mitered”, 1 for “rounded” and 2 for “bevel”.
myElem.lineJoin = 2
element.miterLimit
Returns and sets the miter limit property of the element as integer.
myElem.miterLimit = 4
element.overPrint
Returns and sets the overprint property of the element as integer. Allowed
values are 0 for “none”, 1 for “stroke”, 2 for “fill” and 3 for “stroke and fill”.
myElem.overPrint = 2
element.segmentCount
message myElem.segmentcount
element.fill
myElem.fill.colSpec.rgb.red = 200
myElem.fill.colSpec.rgb.green = 60
myElem.fill.colSpec.rgb.blue = 120
element.group.childCount
message myElem.group.childCount
element.document
message myElem.document.destinationRect.top
element.document.startPoint
Returns and sets the start point parameter as point.
myElem.document.startPoint.x = 58.84
element.document.destinationRect
Returns the destination rectangle parameter as rect. This property is read
only.
message myElem.document.destinationRect.bottom
element.document.file_name
Returns the file name of the placed document as string. This property is
read only.
message myElem.document.file_name
element.document.path
Returns the path of the placed document as string. This property is read
only.
message myElem.document.path
element.document.update_mode
Returns and sets the update mode of the placed document as integer.
Allowed values are 1 for “auto”, 2 for “notify” and 3 for “none”.
myElem.document.update_mode = 1
element.document.include_file
Returns and sets if the placed file should be included in the document as
integer. Allowed values are 0 for "do not include" and 2 for "include file"
myElem.document.include_file = 0
element.info
message myElem.info.id
element.info.type
Returns and sets the type of the object info as string.
message myElem.info.type
element.info.id
Returns and sets the object id as string.
myElem.info.id = "AQ01"
element.info.name
Returns and sets the object name as string.
myElem.info.name = "TI"
element.info.tip
Returns and sets the object tip as string.
myElem.info.tip = "hi"
element.info.hotspot
Returns and sets the object hotspot as string. Allowed string values are
“none”, “line” and “region”
myElem.info.hotspot = "region"
element.info.attrCount
Returns the number of attributes of the object as integer. This property is
read only.
message myElem.info.attrCount
element.info.attributes[ ]
This property gives access to object attributes but can not be used directly.
It is assumed that myElem has already been defined as an element for the
following samples
myElem.info.attributes[1].type = "Integer"
element.info.attributes[ ].name
Returns and sets the name of one object attribute as string.
myElem.info.attributes[1].name = "IsoDraw"
element.info.attributes[ ].value
Returns and sets the value of one object attribute. Depending on what
type the attribute is defined (see element.info.attributes[ ].type) the values
of this property could be integer, float or string.
myElem.info.attributes[1].value = "Integer"
element.info.view_context
This property gives access to all view context attributes but can not be
used directly. It is assumed that myElem has already been defined as an
element for the following samples
element.info.view_context.type
Returns and sets the type of the view context as string. Possible values are
"none", "extent" and "size".
myElem.info.view_context.type = "none"
element.info.view_context.rectangle
If the view context “size” is used, this property must also be used to return
and set the size of the view context as rectangle.
myElem.info.view_context.rectangle.top = 500.89
myElem.info.view_context.rectangle.left = 200
myElem.info.view_context.rectangle.bottom =
300.54
myElem.info.view_context.rectangle.right =
350.34
element.line
element.line.startPoint
Returns and sets the start point of the line as point.
myElem.line.startPoint.x = 107.55
myElem.line.startPoint.y = 157.39
element.line.segments[ ].selected
Returns the selected state of one line segment as integer. This property is
read only. 0 means “not selected” and 1 means “selected”.
message myElem.line.segments[1].selected
element.line.segments[ ].endPoint
Returns and sets the end point of one line segment as point.
myElem.line.segments[1].endPoint.x = 188.66
myElem.line.segments[1].endPoint.y = 256.66
element.line.segments[ ].pen
Returns and sets the pen of one line segment as string. Any existing pen
is allowed.
myElem.line.segments[1].pen = "Thick"
element.line.segments[ ].style
Returns and sets the style of one line segment as string. Any existing style
is allowed.
myElem.line.segments[1].style = "Solid"
element.line.segments[ ].shadow
Returns and sets the shadow of one line segment as string. Any existing
shadow is allowed.
element.ellipse
element.ellipse.centerPoint
Returns and sets the center point of the ellipse as point.
myElem.ellipse.centerPoint.x = 58.76
myElem.ellipse.centerPoint.y = 12.45
element.ellipse.angle
Returns and sets the angle of the ellipse as float.
myElem.ellipse.angle = 45
element.ellipse.value
Returns and sets the value of the ellipse as float.
myElem.ellipse.value = 90
element.ellipse.radius
Returns and sets the radius of the ellipse as float.
myElem.ellipse.radius = 500
element.ellipse.segments[ ].selected
Returns the selected state of one ellipse segment as integer. This property
is read only. 0 means “not selected” and 1 means “selected”.
message myElem.ellipse.segments[1].selected
element.ellipse.segments[ ].startAngle
Returns and sets the start angle of one ellipse segment as float.
myElem.ellipse.segments[1].startAngle = 35.7
element.ellipse.segments[ ].endAngle
Returns and sets the end angle of one ellipse segment as float.
myElem.ellipse.segments[1].endAngle = 35.7
element.ellipse.segments[ ].pen
Returns and sets the pen of one ellipse segment as string. Any existing pen
is allowed.
element.ellipse.segments[ ].style
Returns and sets the style of the ellipse segment as string. Any existing
style is allowed.
myElem.ellipse.segments[1].style = "Solid"
element.ellipse.segments[ ].shadow
Returns and sets the shadow of one ellipse segment as string. Any existing
shadow is allowed.
myElem.ellipse.segments[1].shadow = "Autom.
Long"
element.innerthread
This property gives access to all inner threads attributes but it can not be
used directly. It is assumed that myElem has already been defined as an
element for the following samples
element.innerthread.centerPoint
Returns and sets the center point of the inner thread as point.
myElem.innerthread.centerPoint.x = 134.56
myElem.innerthread.centerPoint.y = 12.45
element.innerthread.angle
Returns and sets the angle of the inner thread as float.
myElem.innerthread.angle = 45
element.innerthread.value
Returns and sets the value of the inner thread as float.
myElem.innerthread.value = 90
element.innerthread.radius
Returns and sets the radius of the inner thread as float.
myElem.innerthread.radius = 500
element.innerthread.segments[ ].selected
message myElem.innerthread.segments[1].selected
element.innerthread.segments[ ].startAngle
Returns and sets the start angle of one inner thread segment as float.
myElem.innerthread.segments[1].startAngle =
35.7
element.innerthread.segments[ ].endAngle
Returns and sets the end angle of one inner thread segment as float.
myElem.innerthread.segments[1].endAngle = 35.7
element.innerthread.segments[ ].pen
Returns and sets the pen of one inner thread segment as string. Any
existing pen is allowed.
myElem.innerthread.segments[1].pen = "Thick"
element.innerthread.segments[ ].style
Returns and sets the style of one inner thread segment as string. Any
existing style is allowed.
myElem.innerthread.segments[1].style = "Solid"
element.innerthread.segments[ ].shadow
Returns and sets the shadow of one inner thread segment as string. Any
existing shadow is allowed.
myElem.innerthread.segments[1].shadow = "Autom.
Long"
element.outerthread
This property gives access to all outer threads attributes but it can not be
used directly. It is assumed that myElem has already been defined as an
element for the following samples
element.outerthread.centerPoint
Returns and sets the center point of the outer thread as point.
element.outerthread.angle
Returns and sets the angle of the outer thread as float.
myElem.outerthread.angle = 45
element.outerthread.value
Returns and sets the value of the outer thread as float.
myElem.outerthread.value = 90
element.outerthread.radius
Returns and sets the radius of the outer thread as float.
myElem.outerthread.radius = 500
element.outerthread.segments[ ].selected
Returns the selected state of one outer thread segment as integer. This
property is read only. 0 means “not selected” and 1 means “selected”.
message myElem.outerthread.segments[1].selected
element.outerthread.segments[ ].startAngle
Returns and sets the start angle of one outer thread segment as float.
myElem.outerthread.segments[1].startAngle =
35.7
element.outerthread.segments[ ].endAngle
Returns and sets the end angle of one outer thread segment as float.
myElem.outerthread.segments[1].endAngle = 35.7
element.outerthread.segments[ ].pen
Returns and sets the pen of one outer thread segment as string. Any
existing pen is allowed.
myElem.outerthread.segments[1].pen = "Thick"
element.outerthread.segments[ ].style
Returns and sets the style of one outer thread segment as string. Any
existing style is allowed.
element.outerthread.segments[ ].shadow
Returns and sets the shadow of one outer thread segment as string. Any
existing shadow is allowed.
myElem.outerthread.segments[1].shadow = "Autom.
Long"
element.callout
This property gives access to all callout attributes but it can not be used
directly. It is assumed that myElem has already been defined as an element
for the following samples
element.callout.style_name
Returns the name of the callout style as string. This property is read only.
message myElem.callout.style_name
element.callout.line_pen
Returns and sets the type of the callout line pen as string. Allowed values
are all existing pen names and "$CS_DEFAULT" for using the value of the
Normal callout style.
message myElem.callout.line_pen
myElem.callout.line_pen = "$CS_DEFAULT"
element.callout.line_style
Returns and sets the type of the callout line style as string. Allowed values
are all existing style names and "$CS_DEFAULT" for using the value of the
Normal callout style.
myElem.callout.line_style = "$CS_DEFAULT"
element.callout.line_shadow
Returns and sets the type of the callout line shadow as string. Allowed
values are all existing shadow names and "$CS_DEFAULT" for using the
value of the Normal callout style.
myElem.callout.line_shadow = "$CS_DEFAULT"
0 "None"
1 "Circle"
2 "Triangle Up"
3 "Triangle Down"
4 "Rectangle"
5 "Pentagon"
6 "Hexagon"
myElem.callout.shape_type = 2
myElem.callout.shape_type = $CS_DEFAULT
element.callout.shape_pen
Returns and sets the callout shape pen as string. Allowed values are all
existing pen names and "$CS_DEFAULT" for using the value of the Normal
callout style.
myElem.callout.shape_pen = "$CS_DEFAULT"
element.callout.shape_style
Returns and sets the callout shape type as string. Allowed values are all
existing line style names and "$CS_DEFAULT" for using the value of the
Normal callout style.
myElem.callout.shape_style = "Solid"
element.callout.shape_shadow
Returns and sets the callout shape shadow as string. Allowed values are
all existing shadow names and "$CS_DEFAULT" for using the value of the
Normal callout style.
element.callout.fill
Returns and sets the fill of the callout shape. Please refer to the section
on defining fills for more information.
myElem.callout.fill.colSpec.type = "ColorRef"
myElem.callout.fill.colSpec.color = "Black"
myElem.callout.fill.colSpec.tone = 0.50
myElem.callout.shape_width = 2.5
element.callout.shape_height
Returns and sets the value of the callout shape height as float. Use
$CS_DEFAULT for the shape type value of the Normal callout style.
myElem.callout.shape_height = 1.5
element.callout.text_update
Returns and sets the status of the text update width as string. The allowed
values are "none" and "auto" or "$CS_DEFAULT" for the value of the
Normal callout style.
myElem.callout.text_update = "auto"
element.callout.text_position
Returns and sets the type of the text alignment as string. The allowed
values are "aligned" and "centered" or "$CS_DEFAULT" for the value of the
Normal callout style.
myElem.callout.text_position = "centered"
element.callout.text_prefix
Returns and sets the text prefix as string. Use "$CS_DEFAULT" for the value
of the Normal callout style.
myElem.callout.text_prefix = "partNo:"
element.callout.text_postfix
Returns and sets the text postfix as string. Use "$CS_DEFAULT" for the
value of the Normal callout style.
myElem.callout.text_postfix = "_66765"
element.callout.text_gap
Returns and sets the text gap as float. Use $CS_DEFAULT for the value of
the Normal callout style.
myElem.callout.text_gap = 1.5
myElem.callout.text_font = "Arial"
element.callout.text_face
Returns and sets the text face of the callout as string. Allowed values are
"normal", "bold", "italic", "bolditalic" and "$CS_DEFAULT" for the value of
the Normal callout style.
myElem.callout.text_face = "bold"
element.callout.text_size
Returns and sets the text size of the callout as float. Use $CS_DEFAULT for
the value of the Normal callout style.
myElem.callout.text_size = 24.5
element.callout.text_strokecolor
Returns and sets the text stroke color of the callout as ColorSpec.
myElem.callout.text_strokecolor.type =
"rgbValues"
element.callout.text_stroke
Returns and sets the text stroke of the callout as float.
myElem.callout.text_stroke = 2.2
element.callout.text_fillcolor
Returns and sets the color of the fill of the text of the callout as ColorSpec.
myElem.callout.text_fillcolor.type =
"rgbValues"
myElem.callout.text_fillcolor.rgb.red = 168
myElem.callout.text_fillcolor.rgb.green = 201
myElem.callout.text_fillcolor.rgb.blue = 98
element.callout.text_scheme
Returns the text scheme of the callout as string. This property is read only.
message myElem.callout.text_scheme
myElem.callout.text_hotspot_flag = 256
element.rect
This property gives access to all rectangle attributes but it can not be used
directly. It is assumed that myElem has already been defined as an element
for the following samples
element.rect.startPoint
Returns and sets the start point of the rectangle as point.
myElem.rect.startPoint.x = 107.55
myElem.rect.startPoint.y = 200.89
element.rect.segments[ ].selected
Returns the selected state of one rectangle segment as integer. This
property is read only. 0 means “not selected” and 1 means “selected”.
message myElem.rect.segments[1].selected
element.rect.segments[ ].endPoint
Returns and sets the end point of one rectangle segment as point.
myElem.rect.segments[1].endPoint.x = 388.66
myElem.rect.segments[1].endPoint.y = 388.66
element.rect.segments[ ].pen
Returns and sets the pen of one rectangle segment as string. Any existing
pen is allowed.
myElem.rect.segments[1].pen = "Thick"
element.rect.segments[ ].style
Returns and sets the style of one rectangle segment as string. Any existing
style is allowed.
myElem.rect.segments[1].style = "Solid"
element.rect.segments[ ].shadow
element.polygon
This property gives access to all polygon attributes but it can not be used
directly. It is assumed that myElem has already been defined as an element
for the following samples
element.polygon.startPoint
Returns and sets the start point of the polygon as point.
myElem.polygon.startPoint.x = 107.55
myElem.polygon.startPoint.y = 107.55
element.polygon.segments[ ].selected
Returns the selected state of one polygon segment as integer. This
property is read only. 0 means “not selected” and 1 means “selected”.
message myElem.polygon.segments[1].selected
element.polygon.segments[ ].endPoint
Returns and sets the end point of one polygon segment as point.
myElem.polygon.segments[1].endPoint.x = 188.66
myElem.polygon.segments[1].endPoint.y = 348.66
element.polygon.segments[ ].pen
Returns and sets the pen of one polygon segment as string. Any existing
pen is allowed.
myElem.polygon.segments[1].pen = "Thick"
element.polygon.segments[ ].style
Returns and sets the style of one polygon segment as string. Any existing
style is allowed.
myElem.polygon.segments[1].style = "Solid"
element.polygon.segments[ ].shadow
Returns and sets the shadow of one polygon segment as string. Any
existing shadow is allowed.
element.marker
This property gives access to all marker attributes but it can not be used
directly. It is assumed that myElem has already been defined as an element
for the following samples
element.marker.startPoint
Returns and sets the start point of the marker as point.
myElem.marker.startPoint.x = 107.55
myElem.marker.startPoint.y = 237.55
element.marker.segments[ ].endPoint
Returns and sets the end point of one marker segment as point.
myElem.marker.segments[1].endPoint.x = 188.66
myElem.marker.segments[1].endPoint.x = 456.34
element.bezier
This property gives access to all bezier attributes but it can not be used
directly. It is assumed that myElem has already been defined as an element
for the following samples
element.bezier.startPoint
Returns and sets the start point of the bezier curve as point.
myElem.bezier.startPoint.x = 107.55
myElem.bezier.startPoint.x = 237.87
element.bezier.bezFlag
Returns and sets the type of the first bezier curve as integer. 0 means
“curve” and 1 means “corner”.
myElem.bezier.bezFlag = 1
element.bezier.segments[ ].selected
Returns the selected state of one bezier segment as integer. This property
is read only. 0 means “not selected” and 1 means “selected”.
message myElem.bezier.segments[1].selected
myElem.bezier.segments[1].h1Point.x = 18.6
myElem.bezier.segments[1].h1Point.y = 18.6
element.bezier.segments[ ].h2Point
Returns and sets the end point of the second bezier segment handle as
point.
myElem.bezier.segments[1].h2Point.x = 32.68
myElem.bezier.segments[1].h2Point.y = 232.67
element.bezier.segments[ ].endPoint
Returns and sets the end point of one bezier segment as point.
myElem.bezier.segments[1].endPoint.x = 129.56
myElem.bezier.segments[1].endPoint.y = 122.53
element.bezier.segment[ ].bezFlag
Returns and sets the type of one bezier segment as integer. 0 means
“curve” and 1 means “corner”.
myElem.bezier.segments[1].bezFlag = 1
element.bezier.segments[ ].pen
Returns and sets the pen of one bezier segment as string. Any existing pen
is allowed.
myElem.bezier.segments[1].pen = "Thick"
element.bezier.segments[ ].style
Returns and sets the style of one bezier segment as string. Any existing
style is allowed.
myElem.bezier.segments[1].style = "Solid"
element.bezier.segments[ ].shadow
Returns and sets the shadow of one bezier segment as string. Any existing
shadow is allowed.
element.text
element.text.startPoint
Returns and sets the start point of a text element as point.
myElem.text.startPoint.x = 122.76
myElem.text.startPoint.y = 131.76
element.text.justHor
Returns and sets the horizontal justification of a text element as integer.
Allowed values are 0 for “left”, 1 for “center” and (-1) for “right”.
myElem.text.justHor = 0
element.text.justVer
Returns and sets the vertical justification of a text element as integer.
Allowed values are 1 for “top”, 2 for “middle”, 3 for “bottom” and 4 for
“baseline”.
myElem.text.justVer = 2
element.text.stroke
Returns and sets the stroke width of a text element as float. You can enter
any size but when you enter -256 you will deactivate the stroke.
myElem.text.stroke = 2
element.text.back_stroke
Returns and sets the stroke width of the background of a text element as
float. You can enter any size but when you enter -256 you will deactivate
the stroke.
myElem.text.back_stroke = 1.5
element.text.backstroke_color
Returns and sets the stroke color of the background of a text element as
ColorSpec.
myElem.text.backstroke_color.type = "rgbValues"
myElem.text.backstroke_color.rgb.red = 188
myElem.text.backstroke_color.rgb.green = 208
myElem.text.backstroke_color.rgb.blue = 168
myElem.text.backfill_color.type = "rgbValues"
myElem.text.backfill_color.rgb.red = 234
myElem.text.backfill_color.rgb.green = 29
myElem.text.backfill_color.rgb.blue = 176
element.text.back_width
Returns and sets the width of the background of a text element as Float.
myElem.text.back_width = 2.2
element.text.back_height
Returns and sets the height of the background of a text element as Float.
myElem.text.back_height = 1.1
element.text.back_shape
Returns and sets the shape of the background of a text element as integer.
Allowed values are 0 for “rectangle” and 1 for “circle”.
myElem.text.back_shape = 1
element.text.back_auto
Returns and sets if the background of a text element is adjusted to the
text as boolean.
myElem.text.back_auto = TRUE
element.text.string
Returns and sets the displayed text of a text element as string.
element.image
This property gives access to all image attributes but it can not be used
directly. It is assumed that myElem has already been defined as an element
for the following samples
element.image.startPoint
myElem.image.startPoint.x = 122.76
myElem.image.startPoint.y = 131.76
element.image.horResolution
Returns the horizontal resolution of an image element in DPI as float. This
value is Read Only.
message myElem.image.horResolution
element.image.verResolution
Returns the vertical resolution of an image element in DPI as float. This
value is Read Only.
message myElem.image.verResolution
element.image.pixelDepth
Returns the pixel depth of an image element as integer. This value is Read
Only.
message myElem.image.pixelDepth
element.image.kind
Returns the kind of image element selected as string. This value is Read
Only.
message myElem.image.kind
element.image.rowBytes
Returns the image’s horizontal size in bytes as integer. This value is Read
Only.
message myElem.image.rowBytes
element.image.imageWidth
Returns the image’s horizontal size in pixels as integer. This value is Read
Only.
message myElem.image.imageWidth
element.image.imageHeight
message myElem.image.imageHeight
All layer commands (add, cut, paste ...) return a reference on the modified
layer. The properties of this layer object can be queried and set.
myLyr.name = "GearBox"
message myLyr.name
End Macro
It is assumed that myLyr has already been defined as a layer for the
following samples
layer.name
myLyr.name = "GearBox"
message myLyr.name
layer.screenColor
myLyr.screenColor.red = 100
myLyr.screenColor.green = 200
layer.locked
Returns and sets the locked state of the layer as integer. Allowed values
are 0 for “unlocked” and 1 for “locked”.
myLyr.locked = 0
layer.active
Returns the active state of the layer as boolean. This property is read only.
message myLyr.active
layer.printable
myLyr.printable = true
layer.exportable
myLyr.exportable = false
layer.visible
myLyr.visible = true
layer.hasElements
Returns if the layer has elements as boolean. This property is read only.
message myLyr.hasElements
layer.useColor
layer.firstChild
This will return the first element which is located on the layer. The
returned data type is element. This property is read only.
layer.lastChild
This will return the first element which is located on the layer. The
returned data type is element. This property is read only.
layer.previousSibling
This property will return the previous layer of the layer list. The returned
data type is layer. This property is read only. (see next and previous layer
example)
layer.nextSibling
This property will return the next layer of the layer list. The returned data
type is layer. This property is read only.
macro LayerSibling
define i as integer
define theLay as layer
i = activeDoc.layerCount
theLay = activeDoc.layers[i]
while (exists (theLay) = true)
message "Processing layer " +
theLay.name
theLay = theLay.previousSibling
end while
end macro
With the Application object you can gain access to nearly all options
available in the IsoDraw preferences.
app.version
This set of properties you will determine the version of IsoDraw the macro
is running on.
app.version.name
This property returns the name of the application. This is read only.
message app.version.name
#returns: (e.g.) IsoDraw 6.1 - US
app.version.main
This returns the “main” version number of IsoDraw as integer. This
property is read only.
app.version.sub
This returns the “sub” version number of IsoDraw as integer. This property
is read only.
app.version.build
This returns the “build” number of IsoDraw as integer. This property is read
only.
app.version.xtra
app.docCount
message app.docCount
app.documents[ ].name
Returns the name of one currently opened document. This property is read
only.
message app.documents[1].name
app.penCount
Returns the number of default pens as integer. This property is read only.
message app.penCount
app.styleCount
Returns the number of default styles as integer. This property is read only.
message app.styleCount
app.shadowCount
message app.shadowCount
app.GridCount
Returns the number of default grids as integer. This property is read only.
message app.GridCount
Returns the number of default colors as integer. This property is read only.
message app.colorCount
app.hatchingCount
message app.hatchingCount
app.patternCount
message app.patternCount
app.formatCount
message app.formatCount
app.calloutCount
message app.calloutCount
app.password
app.password = "pumpernickel"
app.drawOffscreen
app.useAntiAliasing
app.useAntiAliasing = true
app.showLineStyles
Returns and sets the show Line Styles in attribute window property as
boolean.
app.showLineStyles = true
app.showToolTips
app.showToolTips = true
app.showRulers
app.showRulers = true
app.showCursorInfo
app.showCursorInfo = true
app.magnetFlags
Returns and sets the magnetFlags property as integer. The allowed values
are:
app.magnetFlags = 4
app.selectableFills
app.selectableFills = true
app.useIsoExtOnMac
app.useIsoExtOnMac = true
app.allowInternet
app.allowInternet = true
app.updatePeriod
app.updatePeriod = 4
app.numberOfUndos
app.numberOfUndos = 25
app.autoSave = true
app.autoSaveMinutes
app.autoSaveMinutes = 5
app.useEllipsesIn3DTools
Returns and sets the Find elliptical arcs property as boolean. This option
appears as a dialog when using the rotational surfaces or extrusion tool.
It specifies whether elliptical arcs should be modeled as ellipses.
app.useEllipsesIn3DTools = true
app.preview
This property gives access to all preview properties but it can not be used
directly.
app.preview.resolution
Returns and sets the resolution property as float.
app.preview.resolution = 72
app.preview.border
Returns and sets the border width property as float.
app.preview.border = 1
app.preview.width
Returns and sets the fixed width property in mm as float. The value (-1)
disables the fixed width.
app.preview.width = 100
app.preview.kind
app.preview.kind = "color24"
app.preview.compression
Returns and sets the compression property as integer. The allowed values
are:
1 "none"
2 "PackBits"
3 "CCIT Group 3"
4 "CCIT Group 4"
5 "LZW"
6 "LZW2".
app.preview.compression = 2
app.preview.page
Returns and sets the dimension property as integer. The allowed values are
1 for "Extent" and 2 for "Drawing Size".
app.preview.page = 1
app.preview.intelOrder
Returns and sets the byte order property as boolean.
app.preview.intelOrder = true
app.preview.wantsPreview
Returns and sets the generate preview property as boolean.
app.preview.wantsPreview = true
app.compare
This property gives access to all compare attributes but it can not be used
directly.
app.compare.deletedColor
Returns and sets the deleted elements property as RGBColor.
app.compare.changedColor
Returns and sets the changed elements property as RGBColor.
app.compare.changedColor.green = 212
app.compare.createdColor
Returns and sets the created elements property as RGBColor.
app.compare.createdColor.blue = 122
app.options3D
This property gives access to all 3D Options attributes but it can not be
used directly.
app.options3D.showDialog
Returns and sets the Show options dialog before converting to 2D
property as boolean.
app.options3D.showDialog = true
app.options3D.renderSmoothAngle
Returns and sets the Max. smoothing angle property as integer. Allowed
values are from 0 to 120.
app.options3D.renderSmoothAngle = 65
app.options3D.objectAccuracy
Returns and sets the Tesselation Accuracy property as integer. Allowed
values are from 0 to 100.
app.options3D.objectAccuracy = 32
app.project3D
This property gives access to all 3D Projection attributes but it can not be
used directly.
app.project3D.asWireframe
Returns and sets the as wireframe attribute as boolean.
app.project3D.useThickThin
Returns and sets the use create thick/thin lines property as boolean.
app.project3D.useThickThin = true
app.project3D.createSurfaceBorders
Returns and sets the use create surface borders property as boolean.
app.project3D.createSurfaceBorders = false
app.project3D.smoothSurfaces
Returns and sets the Thin line threshold property as integer. Allowed
values are from 0 to 100.
app.project3D.smoothSurfaces = 65
app.project3D.thickPen
Returns and sets the for thick lines property as string. Allowed values are
any existing pen name.
app.project3D.thickPen = "$ISO_Thick"
app.project3D.thinPen
Returns and sets the for thin lines property as string. Allowed values are
any existing pen name.
app.project3D.thinPen = "$ISO_Thin"
app.dimensions
This property gives access to all dimension attributes but it can not be
used directly.
app.dimensions.baseOffset
Returns and sets the base offset property as float.
app.dimensions.baseOffset = 2
app.dimensions.extendOffset
Returns and sets the extend offset property as float.
app.dimensions.verticalOffset
Returns and sets the vertical offset property as float.
app.dimensions.verticalOffset = 0
app.dimensions.minLength
Returns and sets the minimum length property as float.
app.dimensions.minLength = 5
app.dimensions.decimalPlaces
Returns and sets the decimal places property as integer.
app.dimensions.decimalPlaces = 2
app.dimensions.leaderPen
Returns and sets the leader pen property as string. All existing pens are
allowed.
app.dimensions.leaderPen = "Thick"
app.dimensions.leaderStyle
Returns and sets the leader style property as string. All existing styles are
allowed.
app.dimensions.leaderStyle = "Solid"
app.dimensions.leaderShadow
Returns and sets the leader shadow property as string. All existing
shadows are allowed.
app.dimensions.startPen
Returns and sets the start pen property as string. All existing pens are
allowed.
app.dimensions.startPen = "Thick"
app.dimensions.startStyle
Returns and sets the start style property as string. All existing styles are
allowed.
app.dimensions.startShadow
Returns and sets the start shadow property as string. All existing shadows
are allowed.
app.dimensions.endPen
Returns and sets the end pen property as string. All existing pens are
allowed.
app.dimensions.endPen = "Thick"
app.dimensions.endStyle
Returns and sets the end style property as string. All existing styles are
allowed.
app.dimensions.endStyle = "Solid"
app.dimensions.endShadow
Returns and sets the end shadow property as string. All existing shadows
are allowed.
app.dimensions.stripZeros
Returns and sets the strip zeros property as boolean.
app.dimensions.stripZeros = true
app.dimensions.txtFormat
Returns and sets the text format property as string. All existing text
formats are allowed.
app.dimensions.txtFormat = "Normal"
app.dimensions.txtFont
Returns and sets the text font property as string. All installed fonts are
allowed.
app.dimensions.txtFont = "Arial"
app.dimensions.txtFace
app.dimensions.txtFace = "bold"
app.dimensions.txtSize
Returns and sets the text size property as float.
app.dimensions.txtSize = 24.5
app.dimensions.txtStrokeColor
Returns and sets the text strokecolor property as ColorSpec.
app.dimensions.txtStrokeColor.type =
"cmykValues"
app.dimensions.txtStroke
Returns and sets the text stroke property as float.
app.dimensions.txtStroke = 2.2
app.dimensions.textFillcolor
Returns and sets the text fillcolor property as ColorSpec.
app.dimensions.textFillColor.type = "rgbValues"
app.dimensions.textFillColor.rgb.red = 168
app.dimensions.textFillColor.rgb.green = 168
app.dimensions.textFillColor.rgb.blue = 168
app.grid
This property gives access to all grid attributes but it can not be used
directly.
app.grid.gridSize
Returns and sets the grid size property as float.
app.grid.gridSize = 20
app.grid.radius
Returns and sets the magnetic radius property as float.
app.grid.radius = 5
app.grid.elementMagnet = true
app.grid.gridMagnet
Returns and sets the magnetic grid points property as boolean.
app.grid.gridMagnet = true
app.grid.showGrid
Returns and sets the show grid property as boolean.
app.grid.showGrid = true
app.grid.showDim
Returns and sets the show dimensions property as boolean.
app.grid.showDim = true
app.grid.constrain
Returns and sets the align to grid property as boolean.
app.grid.constrain = true
app.grid.gridInFront
Returns and sets the grid in front property as boolean.
app.grid.gridInFront = true
app.grid.noFShortInIso
Returns and sets the no isometric foreshortening property as boolean.
app.grid.noFShortInIso = true
app.grid.gridColor
Returns and sets the color property as RGBColor.
app.grid.gridColor.red = 0
app.grid.firstSelColor
Returns and sets the first color property as RGBColor.
app.grid.firstSelColor.green = 0
app.grid.secondSelColor.blue = 0
app.grid.preferredGrid
Returns and sets the name of the standard Grid as string. Only the names
of existing grids can be set.
app.window
This property gives access to all window attributes but it can not be used
directly.
app.window.pageX
Returns and sets the window x-cords property as float.
app.window.pageX = 200
app.window.pageY
Returns and sets the window y-cords property as float.
app.window.pageY = 230
app.window.overlapX
Returns and sets the print overlap x-cords property as float.
app.window.overlapX = 10
app.window.overlapY
Returns and sets the print overlap y-cords property as float.
app.window.overlapY = 10
app.window.Scale
Returns and sets the window scale property as float.
app.window.Scale = 10
app.window.dimScale
Returns and sets the dimension scaling property as float.
app.window.preview
Returns and sets the objects preview property as integer. The allowed
values are 0 for “no preview”, 1 for “a preview”, 2 for “visible hotspots” and
4 for “visible objects”. 3 is for “preview and hotspots”, 6 is for “hotspots
and objects” and 7 is for everything.
app.window.preview = 6
app.window.is3D
Returns the 3D property as boolean. This property is read only.
message app.window.is3D
app.window.curSystem
Returns and sets the current system property as string. Allowed values are
"mm", "in" and "pt".
app.window.curSystem = "mm"
app.shadow
This property gives access to all shadow attributes but it can not be used
directly.
app.shadow.shadowWidth
Returns and sets the shadow width property as float.
app.shadow.shadowWidth = 5
app.shadow.shadowFactor
Returns and sets the shadow factor property as float.
app.shadow.shadowFactor = 2
app.thread
This property gives access to all thread attributes but it can not be used
directly.
app.thread.inner.upTo1
Returns and sets the first "inner thread up to" property as float.
app.thread.inner.upTo2
Returns and sets the second "inner thread up to" property as float.
app.thread.inner.upTo2 = 40
app.thread.inner.size1
Returns and sets the first inner thread distance property as float.
app.thread.inner.size1 = 2
app.thread.inner.size2
Returns and sets the second inner thread distance property as float.
app.thread.inner.size2 = 2.5
app.thread.inner.size3
Returns and sets the third inner thread distance property as float.
app.thread.inner.size3 = 3
app.thread.outer.upTo1
Returns and sets the first "outer thread up to" property as float.
app.thread.outer.upTo1 = 20
app.thread.outer.upTo2
Returns and sets the second "outer thread up to" property as float.
app.thread.outer.upTo2 = 40
app.thread.outer.size1
Returns and sets the first outer thread distance property as float.
app.thread.outer.size1 = 2
app.thread.outer.size2
Returns and sets the second outer thread distance property as float.
app.thread.outer.size2 = 2.5
app.thread.outer.size3
Returns and sets the third outer thread distance property as float.
app.thickthin
This property gives access to all thick/thin attributes but it can not be used
directly.
app.thickthin.useThickThin
Returns and sets the "use thick thin technique" property as boolean.
app.thickthin.useThickThin = true
app.thickthin.thickPen
Returns and sets the thick pen property as string. The name of every
existing pen is an allowed value.
app.thickthin.thickPen = "Thick"
app.thickthin.thinPen
Returns and sets the thin pen property as string. The name of every
existing pen is an allowed value.
app.thickthin.thinPen = "Thin"
app.thickthin.useEllipsePens
Returns and sets the "specify pens for ellipses and threads" property as
boolean.
app.thickthin.useEllipsePens = true
app.thickthin.thick1
Returns and sets the first thick pen property as string. The name of every
existing pen is an allowed value.
app.thickthin.thick1 = "Thick"
app.thickthin.thin1
Returns and sets the first thin pen property as string. The name of every
existing pen is an allowed value.
app.thickthin.thin1 = "Thin"
app.thickthin.thick2
app.thickthin.thick2 = "Thick"
app.thickthin.thin2
Returns and sets the second thin pen property as string. The name of every
existing pen is an allowed value.
app.thickthin.thin2 = "Thin"
app.thickthin.thick3
Returns and sets the third thick pen property as string. The name of every
existing pen is an allowed value.
app.thickthin.thick3 = "Thick"
app.thickthin.thin3
Returns and sets the third thin pen property as string. The name of every
existing pen is an allowed value.
app.thickthin.thin3 = "Thin"
app.thickthin.upto1
Returns and sets the first up to property as float.
app.thickthin.upto1 = 20
app.thickthin.upto2
Returns and sets the second up to property as float.
app.thickthin.upto2 = 40
app.polygontool
This property gives access to all polygon tool attributes but it can not be
used directly.
app.polygontool.sides
Returns and sets the polygon sides property as integer.
app.polygontool.sides = 7
This property gives access to all ellipse tool attributes but it can not be
used directly.
app.ellipsetool.value
Returns and sets the ellipse value property as float.
app.ellipsetool.value = 50
app.rectangletool
This property gives access to all rectangle tool attributes but it can not be
used directly.
app.rectangletool.radius
Returns and sets the rectangle radius value property as float.
app.rectangletool.radius = 25
app.background
This property gives access to all background attributes but it can not be
used directly.
app.background.inColor
Returns and sets the in color property as boolean.
app.background.inColor = true
app.background.intensity
Returns and sets the intensity property as float. The properties range is
from 0 to 100.
app.background.intensity = 50
app.background.Color
Returns and sets the screen color property as RGBColor.
app.lineOptions
app.lineOptions.lineCap
Returns and sets the ends property as integer. Allowed values are 0 for
“flat”, 1 for “round” and 2 for “square”.
app.lineOptions.lineCap = 1
app.lineOptions.lineJoin
Returns and sets the corners property as integer. Allowed values are 0 for
“mitered”, 1 for “rounded” and 2 for “bevel”.
app.lineOptions.lineJoin = 2
app.lineOptions.miterLimit
Returns and sets the miter limit property as integer.
app.lineOptions.miterLimit = 4
app.lineOptions.overPrint
Returns and sets the overprint property as integer. Allowed values are 0
for “none”, 1 for “stroke”, 2 for “square” and 3 for “stroke and square”.
app.lineOptions.overPrint = 2
app.simpleEllipsePrinting
This property sets and returns the simple ellipse printing as boolean.
app.simpleEllipsePrinting = true
app.curMacroTransform
This property returns the current transformation properties but it can not
be used directly.
app.curMacroTransform.offset
Returns the offset property as point. This property is read only.
message app.curMacroTransform.offset
app.curMacroTransform.angle
message app.curMacroTransform.angle
app.curMacroTransform.scale
Returns the scale property as point. This property is read only.
message app.curMacroTransform.scale
app.dtd
app.dtd = "webcgm"
app.standardTxtFormat
This property returns and sets which text format is the standard text
format as string.
app.standardTxtFormat = "Normal"
app.option
app.option.smooth_tolerance
Returns and sets the Tolerance for smoothing property as float. This
setting does not make a permanent change. The value will be reset to 0.1
each time IsoDraw is restarted.
app.option.smooth_tolerance = 0.1
app.interaction = false
You can gain access to the data exchange settings through the
Application Object.
Import CGM
app.cgm.showDialog
Returns and sets if the cgm import dialog is shown as boolean.
app.cgm.showDialog = TRUE
app.cgm.usebackcolor
Returns and sets if the backcolor is used as boolean.
app.cgm.usebackcolor = TRUE
app.cgm.scale
Returns and sets the scale as float. 1 stands for 100% and 0.1 for 10%.
app.cgm.entities
Sets the CGM options as integer. Please use this formula to calculate the
allowed values:
value = 2^x
0 “Polylines“
1 “Disjoint Polyline“
2 “Polymarker“
3 “Text“
4 “Restricted Text“
5 “Append Text“
6 “Polygon“
7 “Polygon Set“
8 “Cell Array“
9 “Rectangle“
10 “Circle“
11 “Circular Arc 3 Point“
12 “Circular Arc 3 Point Close“
13 “Circular Arc Center“
14 “Circular Arc Center Close“
15 “Ellipse“
16 “Elliptical Arc“
17 “Elliptical Arc Close“
18 “Circular Arc Centre Reversed“
19 “Hyperbolic Arc“
20 “Parabolic Arc“
21 “Non-Uniform B-Spline“
22 “Non-Uniform Rational B-Spline“
23 “Polybezier“
24 “Segments“
25 “Figures“
26 “Tiles“
27 “Background Colour“
28 “Clip Element V1“
29 “Clip Element V3“
30 “Appl. Str. Elements“
app.cgm.importtype = 1
app.cgm.pictures
Returns and sets the import pictures property as integer. Setting this
property to 0 means importing all pictures and setting the property to
another number means importing just one specific picture.
app.cgm.pictures = 0
app.cgm.cgmlinecap
Returns and sets the line caps as integer. Allowed values are 0 for “flat”, 1
for “rounded” and 2 for “rectangle”.
app.cgm.cgmlinecap = 2
app.cgm.cgmlinejoin
Returns and sets the line join as integer. Allowed values are 0 for
“mitered”, 1 for “rounded” and 2 for “bevel”.
app.cgm.cgmlinejoin = 2
app.cgm.pageSizeKind
Returns and sets the page size value as integer. Allowed values are 1 for
“default” and 2 for use “VDC extend”.
app.cgm.pageSizeKind = 1
Export CGM
app.cgm.profile
Returns and sets the CGM profile as integer. Allowed values are
app.cgm.profile = 10
app.cgm.useAECMAs1000d
Returns and sets the S1000d compliant as integer. Allowed values are 0 for
“do not use” and 1 for “use”.
app.cgm.useAECMAs1000d = 1
app.cgm.encoding
Returns and sets the CGM encoding type as integer. Allowed values are 1
for “binary” and 2 for “text”.
app.cgm.encoding = 1
app.cgm.vdcType
Returns and sets the VDC-Type as integer. Allowed values are 1 for “16bit
integer”, 2 for “32bit integer” and 3 for “real”.
app.cgm.vdcType = 2
app.cgm.compressionColor
Returns and sets the compression color type as integer. Allowed values
are:
app.cgm.compressionColor = 3
app.cgm.compressionBW
Returns and sets the B/W compression type as integer. Allowed values are:
1 “none”
2 “runlength”
3 “CCITT Group3 (T4)”
4 “CCITT Group3 (T6)”
5 “PNG”
app.cgm.compressionBW = 2
app.cgm.textType
Returns and sets the text type as integer. Allowed values are:
0 “none”
1 “RT basic”
2 “RT boxed-cap”
3 “RT boxed-all”
4 “RT isotropic-cap”
5 “RT isotropic-all”
6 “RT justified”
app.cgm.textType = 6
app.cgm.exportType
Returns and sets the export text type as integer. Allowed values are 1 for
“basic”, 2 for “boxed-cap” and 3 for “isotropic-cap”.
app.cgm.exportType = 1
app.cgm.ellipseAsPoly
Returns and sets if ellipses should be exported as polylines as boolean.
app.cgm.ellipseAsPoly = FALSE
app.cgm.layerToPicture
app.cgm.layerToPicture = FALSE
app.cgm.nativeCGM
Returns and sets if CGM should be used as the native file format as
boolean.
app.cgm.nativeCGM = FALSE
app.cgm.changeURL
Returns and sets if .iso should be replaced with .cgm in links as boolean.
app.cgm.changeURL = TRUE
app.cgm.vdcExtentMode
Returns and sets the VDC extent mode as integer. Allowed values are 0 for
“include all points”, 1 for “bounding box” and 2 for “page size”.
app.cgm.vdcExtentMode = 2
app.cgm.styleHandling
Returns and sets the linestyle handling mode as integer. Allowed values
are:
1 “map”
2 “split”
3 “LETD if not solid”
4 “LETD always”
app.cgm.styleHandling = 3
app.cgm.extension
Returns and sets the file extension as string.
app.cgm.extension = "cgm"
app.cgm.version
Returns and sets the CGM version as integer. Allowed values are 1 for “1”,
2 for “2”, 3 for “3” and 4 for “4”.
app.cgm.version = 1
app.eps.extension
Returns and sets the file extension as string.
app.eps.extension = "eps"
app.eps.preview
Returns and sets the preview as integer. Allowed values are 1 for “no
preview”, 2 for “for MS-DOS” and 3 for “for Mac”.
app.eps.preview = 2
app.eps.embedFonts
Returns and sets if type 1 fonts should be embedded as boolean.
app.eps.embedFonts = FALSE
Import Illustrator
app.ill.ignoreGuides
Returns and sets if the guides are ignored as boolean.
app.ill.ignoreGuides = TRUE
Export Illustrator
app.ill.extension
Returns and sets the file extension as string.
app.ill.extension = "ai"
app.ill.includeEPS
Returns and sets if the EPS file is included as boolean.
app.ill.includeEPS = FALSE
app.ill.version
Returns and sets the illustrator version as integer. Allowed values are 0 for
“Adobe Illustrator™ 7.0”, 1 for “Adobe Illustrator™ 88” and 2 for “Adobe
Illustrator™ 6.0”.
app.ill.version = 0
app.svg.extension
Returns and sets the file extension as string.
app.svg.extension = "svg"
app.svg.compressed
Returns and sets if an compressed svgz file is created as boolean.
app.svg.compressed = FALSE
app.svg.embedRaster
Returns and sets if the raster image is embedded as boolean.
app.svg.embedRaster = FALSE
app.svg.size
Returns and sets the Illustration size as integer. Allowed values are 1 for
“scalable illustration” and 2 for “fixed size illustration”.
app.svg.size = 2
app.svg.page
Returns and sets the Dimensions as integer. Allowed values are 1 for
“Drawing size” and 2 for “Extent”.
app.svg.page = 1
app.svg.encoding
Returns and sets the file encoding as integer. Allowed values are 1 for “ISO
Latin”, 2 for “UTF-8” and 3 for “UTF-16”.
app.svg.encoding = 2
app.svg.hotspot_regions
Returns and sets the Hotspot regions as integer. Allowed values are 1 for
“use visible geometry only” and 2 for “create region paths”.
app.svg.hotspot_regions = 2
app.svg.object_attributes
app.svg.object_attributes = 2
Import IGES
app.iges.showDialog
Returns and sets if the IGES import dialog is shown as boolean.
app.iges.showDialog = TRUE
app.iges.scale
Returns and sets the scale as float. 1 is used for 100% and 0.1 for 10%.
app.iges.platformIn
Returns and sets the import platform as integer. Allowed values are 1 for
“Mac”, 2 for “MS Win” and 3 for “Unix”.
app.iges.platformIn = 3
app.iges.selectGroups
Returns and sets if the assemblies should be selected as boolean.
app.iges.selectGroups = FALSE
app.iges.createInfo
Returns and sets if the object informations for the assemblies should be
created as boolean.
app.iges.createInfo = FALSE
app.iges.hsType
Returns and sets which hotspot type is created for the assemblies as
integer. Allowed values are 0 for “no hotspot” and 1 for “lines of objects”.
app.iges.hsType = 1
app.iges.ignoreInvisElts
app.iges.ignoreInvisElts = TRUE
app.iges.use102
Returns and sets if the entity 102 should be used as bezier path as boolean.
app.iges.use102 = TRUE
app.iges.convertAnnotations
Returns and sets if the annotations of the elements should be converted
as boolean.
app.iges.convertAnnotations = TRUE
app.iges.views
Returns and sets how elements which are not assigned to a view should
be handled as integer. Allowed values are 0 for “without any view” and 1
for “in all views”.
app.iges.views = 1
app.iges.bestView
Returns and sets is the best view is chosen automatically as integer.
Allowed values are 0 for “do not check best view” and 1 for “check best
view automatically”.
app.iges.bestView = 1
app.iges.entityFlags1
Returns and sets the IGES options as integer. Please use this formula to
calculate the allowed values:
value = 2^x
x Option
app.iges.entityFlags2
Returns and sets the IGES options as integer. Please use this formula to
calculate the allowed values:
value = 2^x
Export IGES
app.iges.platformout
Returns and sets the export platform as integer. Allowed values are 1 for
“Mac”, 2 for “MS Win” and 3 for “Unix”.
app.iges.platformout = 2
app.iges.extension
Returns and sets the file extension as string.
app.iges.extension = "igs"
app.iges.standard
app.iges.standard = 3
app.iges.sender
Returns and sets the sender information as string.
app.iges.receiver
Returns and sets the receiver information as string.
app.iges.author
Returns and sets the author information as string.
app.iges.author = "MS"
app.iges.company
Returns and sets the company information as string.
app.iges.VDAIS.sender
Returns and sets the VDAIS Sendefirma information as string.
app.iges.VDAIS.partner
Returns and sets the VDAIS Ansprechpartner information as string.
app.iges.vdais.partner = "MS"
app.iges.VDAIS.tel
Returns and sets the VDAIS Telefon information as string.
app.iges.VDAIS.adresse
Returns and sets the VDAIS Adresse information as string.
app.iges.vdais.system = "WIN2K"
app.iges.VDAIS.projekt
Returns and sets the VDAIS Projekt information as string.
app.iges.VDAIS.kennung
Returns and sets the VDAIS Projektkennung information as string.
app.iges.vdais.kennung = "4711-2"
app.iges.VDAIS.variante
Returns and sets the VDAIS Variante information as string.
app.iges.vdais.variante = "V666"
app.iges.VDAIS.conf
Returns and sets the VDAIS Vertraulichkeit information as string.
app.iges.VDAIS.datum
Returns and sets the VDAIS Gültigkeitsdatum information as string.
app.iges.VDAIS.receiver
Returns and sets the VDAIS Empfängerfirma information as string.
app.iges.VDAIS.recName
Returns and sets the VDAIS Empfängername/Abteilung information as
string.
app.iges.vdais.recName = "DR"
app.iges.CALS1.identifier
Returns and sets the CALS1 Identifier information as string.
app.iges.CALS1.description
Returns and sets the CALS1 Description information as string.
app.iges.CALS2.creator
Returns and sets the CALS2 Creator information as string.
app.iges.CALS2.Creator = "HunchBack"
app.iges.CALS2.PartName
Returns and sets the CALS2 Part Name information as string.
app.iges.CALS2.partName = "EL4456:8876-1B"
app.iges.CALS2.drawingName
Returns and sets the CALS2 Drawing Name information as string.
app.iges.CALS2.description
Returns and sets the CALS2 Description information as string.
app.iges.CALS2.revision
Returns and sets the CALS2 Revision information as string.
app.iges.CALS2.revision = "445:7889:223211c"
app.iges.CALS2.sizeNumber
Returns and sets the CALS2 Size Number information as string.
app.iges.CALS2.sizeNumber = "76DD"
Import DWG
app.dwg.showDialog
Returns and sets if the DWG import dialog is shown as boolean.
app.dwg.showDialog = TRUE
app.dwg.platformIn
Returns and sets the import platform as integer. Allowed values are 1 for
“Mac”, 2 for “MS Win” and 3 for “Unix”.
app.dwg.platformIn = 3
app.dwg.unit
Returns and sets the the corresponding unit as integer. Allowed values are:
1 “mm”
2 “inch”
3 “foot”
4 “m”
app.dwg.unit = 1
app.dwg.polyAsElements
Returns and sets if polylines should be converted into lines and circles as
boolean.
app.dwg.polyAsElements = FALSE
app.dwg.ignoreVarPolyWidth
Returns and sets if variable width of polylines should be ignored as
boolean.
app.dwg.ignoreVarPolyWidth = TRUE
app.dwg.ignoreTextFactor
Returns and sets if the width factor of text elements should be ignored as
boolean.
app.dwg.ignoreTextFactor = TRUE
app.dwg.ignoreHeight
Returns and sets if the height and elevation should be ignored as boolean.
app.dwg.entities
Returns and sets the DWG options as integer. Please use this formula to
calculate the allowed values:
value = 2^x
x Option
0 “LINE“
1 “POINT“
2 “CIRCLE“
3 “SHAPE“
4 “ELLIPSE“
5 “SPLINE“
6 “TEXT“
7 “ARC“
8 “TRACE“
9 “SOLID“
10 “INSERT“
11 “ATTDEF“
12 “ATTRIB“
13 “POLYLINE“
14 “LINE3D“
15 “FACE3D“
16 “DIMENSION“
17 “RAY“
18 “XLINE“
19 “MTEXT“
20 “LEADER“
21 “MLINE“
22 “LWLINE“
23 “PROXY“
24 “HATCH“
25 “VIEWPORT“
app.dwg.release
Returns and sets the AutoCAD release as integer. Allowed values are:
0 “Release 12”
1 “Release 13”
2 “Release 14”
3 “AutoCAD 2000”
app.dwg.release = 3
app.dwg.flags
Returns and sets the conversion flags as integer. Allowed values are 0 for
“Convert ellipses and beziers to 2D polylines”, 1 for “Convert ellipses to 3D
arcs and beziers to 2D polylines”, 2 for “Convert ellipses to 2D Polylines and
beziers to 3D Polylines” and 3 for “Convert ellipses and beziers to 3D”.
Conversion of ellipses (2 and 3) is only valid for “Release 12”!
app.dwg.flags = 2
app.dwg.platformOut
Returns and sets the export platform as integer. Allowed values are 1 for
“Mac”, 2 for “MS Win” and 3 for “Unix”.
app.dwg.platformOut = 3
app.dwg.extension
Returns and sets file extension as string.
app.dwg.extension = "dwg"
Import DXF
app.dxf.showDialog
Returns and sets if the DXF import dialog is shown as boolean.
app.dxf.showDialog = TRUE
app.dxf.scale
Returns and sets the scale as float. 1 stands for 100% and 0.1 for 10%.
app.dxf.platformIn
Returns and sets the import platform as integer. Allowed values are 1 for
“Mac”, 2 for “MS Win” and 3 for “Unix”.
app.dxf.platformIn = 3
app.dxf.unit
Returns and sets the corresponding unit as integer. Allowed values are:
1 “mm”
2 “inch”
3 “foot”
4 “m”
app.dxf.unit = 1
app.dxf.polyAsElements
Returns and sets if polylines should be converted into lines and circles as
boolean.
app.dxf.polyAsElements = FALSE
app.dxf.ignoreVarPolyWidth
Returns and sets if variable width of polylines should be ignored as
boolean.
app.dxf.ignoreVarPolyWidth = TRUE
app.dxf.ignoreTextFactor
Returns and sets if the width factor of text elements should be ignored as
boolean.
app.dxf.ignoreTextFactor = TRUE
app.dxf.ignoreHeight
Returns and sets if the height and elevation should be ignored as boolean.
app.dxf.ignoreHeight = FALSE
app.dxf.entities
x Option
0 “LINE“
1 “POINT“
2 “CIRCLE“
3 “SHAPE“
4 “ELLIPSE“
5 “SPLINE“
6 “TEXT“
7 “ARC“
8 “TRACE“
9 “SOLID“
10 “INSERT“
11 “ATTDEF“
12 “ATTRIB“
13 “POLYLINE“
14 “LINE3D“
15 “FACE3D“
16 “DIMENSION“
17 “RAY“
18 “XLINE“
19 “MTEXT“
20 “LEADER“
21 “MLINE“
22 “LWLINE“
23 “PROXY“
24 “HATCH“
25 “VIEWPORT“
Export DXF
1 “Release”
2 “Release 13”
3 “Release 14”
4 “AutoCAD 2000”
app.dxf.release = 4
app.dxf.flags
Returns and sets the conversion flags as integer. Allowed values are 0 for
“Convert ellipses and beziers to 2D polylines”, 1 for “Convert ellipses to 3D
arcs and beziers to 2D polylines”, 2 for “Convert ellipses to 2D Polylines and
beziers to 3D Polylines” and 3 for “Convert ellipses and beziers to 3D”.
Conversion of ellipses (2 and 3) is only valid for “Release 12”!
app.dxf.flags = 2
app.dxf.platformOut
Returns and sets the export platform as integer. Allowed values are 1 for
“Mac”, 2 for “MS Win” and 3 for “Unix”.
app.dxf.platformOut = 3
app.dxf.extension
Returns and sets file extension as string.
app.dxf.extension = "dxf"
Import VRML
app.vrml.showDialog
Returns and sets if the VRML import dialog is shown as boolean.
app.vrml.showDialog = TRUE
app.vrml.scale
Returns and sets the scale as float. 1 stands for 100% and 0.1 for 10%.
app.vrml.selectGroups = FALSE
app.vrml.createInfo
Returns and sets if the object info for assemblies should be created as
boolean.
app.vrml.createInfo = FALSE
app.vrml.hsType
Returns and sets the hotspot type as integer. Allowed values are 0 for “no
Hotspot” and 1 for “lines of object”.
app.vrml.hsType = 1
app.vrml.readflag
Returns and sets if the buffers should be read for all file sizes as integer.
Allowed values are 1 for “off” and 17 for “create reading buffer for all file
sizes”.
app.vrml.readflag = 17
app.vrml.entities
Returns and sets the VRML options as integer. Please use this formula to
calculate the allowed values:
value = 2^x
x Option
0 “Box“
1 “Cube“
2 “Cone“
3 “Cylinder“
4 “Sphere“
5 “Elevation Grid“
6 “Point Set“
7 “Indexed Line Set“
8 “Indexed Face Set“
9 “Extrusion“
app.vrml.viewpointFlag
Returns and sets the VRML Viewpoints option as integer. Use 0 to not use
viewpoints, use 1 to Use viewpoints; Select from list and use 3 to Use
viewpoints; Predefined viewpoint.
app.vrml.viewpointFlag = 0
app.vrml.viewpointPredef
Returns and sets the Predefined viewpoint option as string. The option to
Use viewpoints; Predefined viewpoint must be selected for this setting to
take affect.
app.vrml.viewpointPredef = "test"
Import Wavefront
app.wavefront.showDialog
Returns and sets if the Wavefront import dialog is shown as boolean.
app.wavefront.showDialog = TRUE
app.wavefront.scale
Returns and sets the scale as float. 1 stands for 100% and 0.1 for 10%.
app.wavefront.selectGroups
Returns and sets if assemblies should be selected as boolean.
app.wavefront.selectGroups = FALSE
app.wavefront.createInfo
Returns and sets if the object info for assemblies should be created as
boolean.
app.wavefront.createInfo = FALSE
app.wavefront.hsType = 1
app.wavefront.readflag
Returns and sets if the buffers should be read for all file sizes as integer.
Allowed values are 1 for “off” and 17 for “create reading buffer for all file
sizes”.
app.wavefront.readflag = 17
Export HPGL
app.hpgl.extension
Returns and sets the file extension as string.
app.hpgl.extension = "hpl"
app.hpgl.sortPens
Returns and sets if the pens should be sorted for the plotter output as
boolean.
app.hpgl.sortPens = TRUE
app.hpgl.refPoint.x
Returns and sets the reference point x-coord as float.
app.hpgl.refPoint.x = 10.1
app.hpgl.refPoint.y
Returns and sets the reference point y-coord as float.
app.hpgl.refPoint.y = 10.2
Export TIFF
app.tiff.extension
Returns and sets the file extension as string.
app.tiff.extension = "tif"
app.tiff.resolution = 200
app.tiff.border
Returns and sets the border thickness as float.
app.tiff.border = 2
app.tiff.depth
Returns the color depth as integer. This property is read only. (Returned
values could be 1, 8, and 24 for 1, 8, and 24 bit)
message app.tiff.depth
app.tiff.kind
Returns and sets the color depth as string. Allowed values are “bitmap”,
“grayscale”, “color8” and “color24”.
app.tiff.kind = "color24"
app.tiff.page
Returns and sets the dimension as integer. Allowed values are 1 for
“Drawing size” and 2 for “Extent”.
app.tiff.page = 2
app.tiff.compression
Returns and sets the compression as integer. Allowed values are 1 for
“none”, 7 for “PackBits”, for “CCITT Group3”, 4 for “CCITT Group4”, 5 for
“LZW” and 6 for “LZW2”.
app.tiff.compression = 2
app.tiff.intelOrder
Returns and sets the byte order as boolean.
app.tiff.intelOrder = TRUE
Export JPEG
app.jpeg.extension
app.jpeg.extension = "jpg"
app.jpeg.resolution
Returns and sets the resolution as float.
app.jpeg.resolution = 200
app.jpeg.border
Returns and sets the border thickness as float.
app.jpeg.border = 2
app.jpeg.kind
Returns and sets the color depth as string. Allowed values are “grayscale”
and “color24”.
app.jpeg.kind = "color24"
app.jpeg.page
Returns and sets the dimension as integer. Allowed values are 1 for
“Drawing size” and 2 for “Extent”.
app.jpeg.page = 2
app.jpeg.quality
Returns and sets the export quality as float. Allowed values are between 1
and 100. A value to 40 would represent 4 on the quality scale.
app.jpeg.quality = 40
Export PNG
app.png.extension
Returns and sets the file extension as string.
app.png.extension = "png"
app.png.resolution
Returns and sets the resolution as float.
app.png.resolution = 200
app.png.border = 2
app.png.kind
Returns and sets the color depth as string. Allowed values are “bitmap”,
“grayscale”, “color8” and “color32”.
app.png.kind = "color32"
app.png.page
Returns and sets the dimension as integer. Allowed values are 1 for
“Drawing size” and 2 for “Extent”.
app.png.page = 2
app.png.filter
Returns and sets the export filter as float. Allowed values are:
0 “None”
1 “Sub”
2 “Up”
3 “Average”
4 “Paeth”
5 “Adaptive”
app.png.filter = 3
Export BMP
app.bmp.extension
Returns and sets the file extension as string.
app.bmp.extension = "bmp"
app.bmp.resolution
Returns and sets the resolution as float.
app.bmp.resolution = 200
app.bmp.border
Returns and sets the border thickness as float.
app.bmp.kind
Returns and sets the color depth as string. Allowed values are “bitmap”,
“grayscale”, “color8” and “color24”.
app.bmp.kind = "color24"
app.bmp.page
Returns and sets the dimension as integer. Allowed values are 1 for
“Drawing size” and 2 for “Extent”.
app.bmp.page = 2
app.bmp.version
Returns and sets the version as integer. Allowed values are 1 for
“Windows” and 2 for “OS/2”.
app.bmp.version = 1
app.bmp.compression
Returns and sets the compression as integer. Allowed values are 0 for
“none” and 1 for “RLE 8”.
app.bmp.compression = 1
Export PCX
app.pcx.extension
Returns and sets the file extension as string.
app.pcx.extension = "pcx"
app.pcx.resolution
Returns and sets the resolution as float.
app.pcx.resolution = 200
app.pcx.border
Returns and sets the border thickness as float.
app.pcx.border = 2
app.pcx.kind = "color24"
app.pcx.page
Returns and sets the dimension as integer. Allowed values are 1 for
“Drawing size” and 2 for “Extent”.
app.pcx.page = 2
app.pcx.encoding
Returns and sets the compression as integer. Allowed values are 1 for
“none” and 2 for “RLE 8”.
app.pcx.encoding = 1
Export CALS
app.cals.extension
Returns and sets the file extension as string.
app.cals.extension = "cc4"
app.cals.resolution
Returns and sets the resolution as float.
app.cals.resolution = 200
app.cals.border
Returns and sets the border thickness as float.
app.cals.border = 2
app.cals.page
Returns and sets the dimension as integer. Allowed values are 1 for
“Drawing size” and 2 for “Extent”.
app.cals.page = 2
app.cals.srcdocid
Returns and sets the srcdocid information as string.
app.cals.dstdocid
Returns and sets the dstdocid information as string.
app.cals.dstdocid = "sample"
app.cals.textfilid
Returns and sets the textfilid information as string.
app.cals.textfilid = "sample"
app.cals.figid
Returns and sets the figid information as string.
app.cals.figid = "sample"
app.cals.srcgph
Returns and sets the srcgph information as string.
app.cals.srcgph = "sample"
app.cals.doccls
Returns and sets the doccls information as string.
app.cals.doccls = "sample"
app.cals.notes
Returns and sets the notes information as string.
app.cals.notes = "sample"
Export Text
app.txt.extension
Returns and sets the file extension as string.
app.txt.extension = "txt"
app.txt.useUnicode
Returns and sets if IsoDraw should generate a unicode text file as boolean.
app.txt.useUnicode = TRUE
app.objectList.extension
Returns and sets the file extension as string.
app.objectList.extension = "txt"
app.objectList.fileTag
Returns and sets the file element as string.
app.objectList.fileTag = "MyFile"
app.objectList.objTag
Returns and sets the object element as string.
app.objectList.objTag = "MyObject"
app.objectList.layerTag
Returns and sets the layer element as string.
app.objectList.layerTag = "MyLayer"
app.objectList.flags
Returns and sets the object list flags as integer. Allowed values are:
1 “Write as XML”
2 “ID”
4 “Name”
8 “Object tip”
16 “Other attributes”
32 “XML attributes”
64 “XML: obj-type as element name”
Export Interleaf
app.interleaf.extension
Returns and sets the file extension as string.
app.interleaf.useStyles
Returns and sets if linestyles should be converted into single elements as
boolean.
app.interleaf.useStyles = TRUE
Export MIF
app.mif.extension
Returns and sets the file extension as string.
app.mif.extension = "mif"
Export PICT
app.pict.extension
Returns and sets the file extension as string.
app.pict.extension = "pic"
Import WMF
app.wmf.showDialog
Returns and sets if the wmf import dialog is shown as boolean.
app.wmf.showDialog = TRUE
app.wmf.asRaster
Returns and sets if the wmf file should be imported as image element as
boolean.
app.wmf.asRaster = FALSE
Export WMF
app.wmf.extension
Returns and sets the file extension as string.
app.wmf.extension = "wmf"
app.wmf.enhanced
Returns and sets if the file should be written as enhanced metafile as
boolean.
app.wmf.enhanced = TRUE
The IsoDraw Macro Language provides different kinds of Sub Data Types.
These Sub Data Types could be imputed to the group of Complex Data
Types but in contrast to these data types, the Sub Data Types can not be
defined. They can only be accessed through the Application or the
Document Object. Keep in mind that with these data types you will only
change the preferences of the current active document (Document
Object) or the preferences of the application (Application Object).
.Pens[ ]
This property gives access to all pen attributes but it can not be used
directly.
.Pens[ ].name
Returns and sets the name of a specific default pen as string.
app.Pens["Thick"].name = "myThickPen"
.Pens[ ].width
Returns and sets the width of a specific default pen as float.
app.Pens[1].width = 2.5
.Pens[ ].color
message app.Pens["Medium"].color.type
.Pens[ ].style
Returns and sets the style of a specific pen as string.
app.Pens["Thick"].style = "Solid"
.Pens[ ].shadow
Returns and sets the type of shadow as string.
.Pens[ ].switchPen
Returns and sets the type of pen switched to as string.
app.Pens[1].switchPen = "Thin"
.Pens[ ].screenColor
Returns and sets the screen color as RGBColor.
app.Pens[3].screenColor.red = 122
app.Pens[3].screenColor.green = 122
app.Pens[3].screenColor.blue = 122
.linestyles[ ]
This property gives access to all style attributes but it can not be used
directly.
.linestyles[].name
Returns and sets the name of the linestyle as string.
app.linestyles[1].name = "myLineStyle"
.linestyles[].type
Returns and sets the type of the linestyle as integer. The allowed values
are 0 for “solid”, 1 for “dashed” and 2 for “dotted”.
app.linestyles[1].type = 2
.linestyles[ ].startMark
app.linestyles[1].startMark = 33
.linestyles[ ].endMark
Returns and sets the end mark of the linestyle as integer between 0 and
46 (0 = no mark).
app.linestyles[1].endMark = 7
.linestyles[ ].minEndLength
Returns and sets the minimum end length of the linestyle as float.
app.linestyles[1].minEndLength = 33
.linestyles[ ].pattern[ ]
Returns and sets the pattern values.
app.linestyles[1].pattern[1]
app.linestyles[1].pattern[1] = 1
app.linestyles[1].pattern[2] = 1.5
app.linestyles[“$ISO_DOTTED”].pattern[1] = 1.5
.shadows[ ]
This property gives access to all shadow attributes but it can not be used
directly.
.shadows[ ].name
Returns and sets the name of the shadow as string.
.shadows[ ].width
Returns and sets the width of the shadow in mm as float. Setting this
value to 0 means automatic; all positive values defining the thickness of
the shadow in mm; all negative values defining the thickness of the
shadow relative to the thickness of the line thickness.
app.shadows[1].width = 7
.shadows[ ].color
Returns and sets the color of the shadow as ColorSpec.
app.shadows[1].color.rgb.red = 155
app.shadows[1].color.rgb.green = 155
app.shadows[1].color.rgb.blue = 155
.shadows[ ].start
Returns and sets the start type of the shadow as integer. Allowed values
are 1 for “long”, 2 for “middle”, 3 for “short”.
app.shadows[1].start = 1
.shadows[ ].end
Returns and sets the end type of the shadow as integer. Allowed values
are 1 for “long”, 2 for “middle”, 3 for “short”.
app.shadows[1].end = 2
.colors[ ]
This property gives access to all color attributes but it can not be used
directly.
.colors[ ].name
Returns and sets the name of the color as string.
app.colors[1].name = "myLovelyBlue"
.colors[ ].kind
Returns and sets the type of the color as string. The allowed values are
"Custom_color", "RGB_color". "CMYK_color" and "Color_Tone".
app.colors[1].kind = "RGB_color"
app.colors[1].color.rgb.red = 188
app.colors[1].color.rgb.green = 188
app.colors[1].color.rgb.blue = 188
.hatchings[ ]
This property gives access to one hatching attribute but it can not be used
directly.
.hatchings[ ].name
Returns and sets the name of the hatching as string.
app.hatchings[1].name = "firstHatch"
.patterns[ ]
This property gives access to one pattern attribute but it can not be used
directly.
.patterns[ ].name
Returns and sets the name of the hatching as string.
app.patterns[1].name = "firstPatch"
.txtFormats[ ]
This property gives access to all text format attributes but it can not be
used directly.
.txtFormats[ ].name
Returns and sets the name of the text format as string.
.txtFormats[ ].font
Returns and sets the name of the font of the text format as string. Any
installed font can be used.
app.txtFormats[1].font = "Arial"
app.txtFormats[1].face = "bold"
.txtFormats[ ].size
Returns and sets the size of the text format as float.
app.txtFormats[1].size = 12
.txtFormats[ ].leading
Returns and sets the leading of the text format as float.
app.txtFormats[1].leading = 2.5
.txtFormats[ ].position
Returns and sets the position of the text format as float.
app.txtFormats[1].position = 8
.txtFormats[ ].kerning
Returns and sets the kerning of the text format as float.
app.txtFormats[1].kerning = 1.2
.callouts[ ]
This property gives access to all callout attributes but it can not be used
directly.
.callouts[ ].style_name
Returns and sets the name of the callout style as string.
app.callouts[1].style_name = "myNewCallout"
.callouts[ ].shape_type
Returns and sets the type of the callout shape type as integer. Allowed
values are 0 for "None", 1 for "Circle", 2 for "Triangle Up", 3 for "Triangle
Down", 4 for "Rectangle", 5 for "Pentagon" and 6 for "Hexagon".
app.callouts[1].shape_type = 2
app.callouts[1].shape_width = 2.5
.callouts[ ].shape_height
Returns and sets the value of the callout shape height as float.
app.callouts[1].shape_height = 1.5
.callouts[ ].shape_pen
Returns and sets the pen of the shape of the callout as string. Any defined
pen can be used.
app.callouts[1].shape_pen = "Thick"
.callouts[ ].shape_style
Returns and sets the style of the shape of the callout as string. Any
defined style can be used.
app.callouts[1].shape_style = "Dashed"
.callouts[ ].shape_shadow
Returns and sets the shadow of the shape of the callout as string. Any
defined shadow can be used.
.callouts[ ].text_update
Returns and sets the status of the text update width as string. The allowed
values are "none" and "auto".
app.callouts[1].text_update = "auto"
.callouts[ ].text_position
Returns and sets the type of the text alignment as string. The allowed
values are "aligned" and "centered".
app.callouts[1].text_position = "centered"
.callouts[ ].text_prefix
Returns and sets the text prefix as string.
.callouts[ ].text_postfix
Returns and sets the text postfix as string.
app.callouts[1].text_postfix = "_66765"
.callouts[ ].text_gap
Returns and sets the text gap as float.
app.callouts[1].text_gap = "1.5"
.callouts[ ].line_pen
Returns and sets the line pen as string. Any existing pen can be used.
app.callouts[1].line_pen = "Thick"
.callouts[ ].line_style
Returns and sets the line style as string. Any existing style can be used.
app.callouts[1].line_style = "Solid"
.callouts[ ].line_shadow
Returns and sets the line shadow as string. Any existing shadow can be
used.
.callouts[ ].fill
Returns and sets the callout fill as fill.
app.callouts[1].fill.type = "no_fill"
.callouts[ ].text_format
Returns and sets the text format of the callout as string. Any defined
format can be used.
app.callouts[1].text_format = "Normal"
.callouts[ ].text_font
Returns and sets the text font of the callout as string. Any installed font
can be used.
app.callouts[1].text_font = "Arial"
app.callouts[1].text_face = "bold"
.callouts[ ].text_size
Returns and sets the text size of the callout as float.
app.callouts[1].text_size = 24.5
.callouts[ ].text_strokecolor
Returns and sets the text stroke color of the callout as ColorSpec.
app.callouts[1].text_strokecolor.type =
"cmykValues"
.callouts[ ].text_stroke
Returns and sets the text stroke of the callout as float.
app.callouts[1].text_stroke = 2.2
.callouts[ ].text_fillcolor
Returns and sets the color of the fill of the text of the callout as ColorSpec.
app.callouts[1].text_fillcolor.rgb.red = 168
app.callouts[1].text_fillcolor.rgb.green = 168
app.callouts[1].text_fillcolor.rgb.blue = 168
.callouts[ ].text_scheme
Returns and sets the text scheme of the callout as string. Allowed values
are "no_scheme", "alpha_uppercase", "alpha_lowercase" and "numeric".
app.callouts[1].text_scheme = "no_scheme"
.callouts[ ].text_hotspot_flag
Returns and sets if the hotspot flag is set as boolean.
app.callouts[1].text_hotspot_flag = false
.grids[ ]
This property gives access to all grid attributes but it can not be used
directly.
app.grids[1].name = "Isometric"
.grids[ ].xAngle
Returns and sets the x-angle of the grid as float.
app.grids[1].xAngle = 30
.grids[ ].zAngle
Returns and sets the z-angle of the grid as float.
app.grids[1].zAngle = 30
Using these names rather than the language specific names will enable
these macros to run in IsoDraw disregarding the language version.
This would switch the pen only if the Pen is really named “No Pen”. This
is true for the English language version of IsoDraw only. In the German
version the appropriate command would be:
myDoc.active_pen = “$ISO_NOPEN”
The proper pen name is calculated during run time of the macro. This
command line would work on IsoDraw, no matter if it is an English,
German, Italian, French or even Japanese installation.
Appendix 227
Pen Names
$ISO_NOPEN
$ISO_THICK
$ISO_MEDIUM
$ISO_THIN
$ISO_CENTERLINE
Style Names
$ISO_SOLID
$ISO_DASHED
$ISO_CENTERLINE
$ISO_DOTTED
$ISO_DOTDASHED
$ISO_DASHDOTDOT
$ISO_STARTARROW
$ISO_ENDARROW
$ISO_ENDDOT
$ISO_ARROW
$ISO_STITCHLINE
$ISO_CENTERLINE2
$ISO_HIDDENLINE
$ISO_PHANTOMLINE
$ISO_BREAKLINE1
$ISO_BREAKLINE2
Shadow Names
$ISO_NOSHADOW
$ISO_LONG
$ISO_MIDDLE
$ISO_SHORT
$ISO_CENTER
Color Names
$ISO_NOFILL
$ISO_WHITE
$ISO_BLACK
Callout Names
$ISO_NORMAL
228 Appendix