[Integration Kit Contents] [Integration Kit What's New] [Integration Kit Function Index] [More Documentation] [PTC]

Annotation Object Creation

Views:
sd-am-create-standard-view
sd-am-create-section-view

Geometry:
sd-am-create-geo-point
sd-am-create-geo-straight
sd-am-create-geo-circular
sd-am-create-geo-spline

Text:
sd-am-create-text

Sketch:
sd-am-create-sketch
sd-am-load-sketch

Function Index Top of Page

SD-AM-CREATE-STANDARD-VIEW  [function]

(sd-am-create-standard-view view-type
                            position
                            reference-view
                            :rel_distance rel_distance)
Description:
Create a standard view bound to current view set at a certain position or relative to an existing view.
Parameters:
view-type {STRING} - The type of the view to be created. One of the following:
"FRONT"
"BACK"
"LEFT_SIDE"
"RIGHT_SIDE"
"TOP"
"BOTTOM"
"FRONT_TOP_LEFT"
"FRONT_TOP_RIGHT"
"BACK_TOP_LEFT"
"BACK_TOP_RIGHT"
"FRONT_BOTTOM_LEFT"
"FRONT_BOTTOM_RIGHT"
"BACK_BOTTOM_LEFT"
"BACK_BOTTOM_RIGHT"
For further information have a look to the SD-AM-VIEW-STRUCT [structure].
position
{GPNT2D} - Coordinates of the view's center.
OR
{KEYWORD} - specifies relative position
:above - created view will be positioned above reference view.
:below - created view will be positioned below reference view.
:to_right - created view will be position at the right side of reference view.
:to_left - created view will be position at the left side of reference view.
When a keyword is used a reference-view has to be specified, too.
reference-view when position is one of the listed keywords
{STRING} - 3D object path name of view used for relative positioning
:rel_distance when position is one of the listed keywords
{LONG-FLOAT [1.1]} - A relative distance factor of 1 means that the views are placed side by side without any space between them. The relative distance between the new created view and the existing view is measured between the view's position like it's displayed when Moving Views.
Return Value:
{PROPERTY LIST}
:view-name - {STRING} 3D object path name of created view
:position position {GPNT2D} or {KEYWORD} used in function call
nil - an error occurred
Example:
is listed here

Function Index Top of Page

SD-AM-CREATE-SECTION-VIEW  [function]

(sd-am-create-section-view parent-view
                           section-line-points
                           position
                           reference-view
                           :rel_distance rel_distance)
Description:
Create a section view at a certain position or relative to an existing view. The section is defined in a parent view using a list of points.
Parameters:
parent-view {STRING} - 3D object path name of parent view for section.
section-line-points {LIST of GPNT2D} - contains all points to define the section line.
position
{GPNT2D} - Coordinates of the view's center.
OR
{KEYWORD} - specifies relative position
:above - created view will be positioned above reference view.
:below - created view will be positioned below reference view.
:to_right - created view will be position at the right side of reference view.
:to_left - created view will be position at the left side of reference view.
When a keyword is used a reference-view has to be specified, too.
reference-view when position is one of the listed keywords
{STRING} - 3D object path name of view used for relative positioning
:rel_distance when position is one of the listed keywords
{LONG-FLOAT [1.1]} - A relative distance factor of 1 means that the views are placed side by side without any space between them. The relative distance between the new created view and the existing view is measured between the view's position like it's displayed when Moving Views.
Return Value:
{PROPERTY LIST}
:view-name - {STRING} 3D object path name of created view
:position position {GPNT2D} or {KEYWORD} used in function call
nil - an error occurred
Example:
is listed here

Function Index Top of Page

SD-AM-CREATE-GEO-POINT  [function]

(sd-am-create-geo-point point
                        :owner_type owner_type
                        :owner owner)
Description:
Create a point at a certain position.
Parameters:
point {GPNT2D or LIST of GPNT2Ds} - coordinates of the point(s)
owner_type {KEYWORD} - defines the type of an owner
:current-sheet - the current sheet is set to be the owner
:current-frame - the current frame is set to be the owner
:2dview - the view specified by :owner is set to be the owner
:sketch - the sketch specified by :owner is set to be the owner
owner {SEL_ITEM or PATHNAME} - only needed when owner_type is specified as :2dview or :sketch
SEL_ITEM representing either
a Creo Elements/Direct Modeling Object (applicable for views only) or
an Annotation Object
complete PATHNAME describing
a Creo Elements/Direct Modeling Object (applicable for views only) ; e.g. "/p1/vs1/front1" or
an Annotation Object ; e.g. "1/front1"
Return Value:
T - owner was valid and point created
nil - an error occured
Example:
(sd-am-create-geo-point (list 0,0 100,100) :owner_type :2dview :owner "/p1/vs1/front1")

Function Index Top of Page

SD-AM-CREATE-GEO-STRAIGHT  [function]

(sd-am-create-geo-straight method
                           arg_lst
                           :owner_type owner_type
                           :owner owner)
Description:
Create a straight geometry element (line)
Parameters:
method {KEYWORD} - method to create the line
:2pos - line between two points
:horizontal - horizontal line
:vertical - vertical line
:angle - line in certain direction
:polygon - polygon through given points
:rectangle - rectangle
arg_lst {LIST} - list of arguments needed for the given method.
To draw multiple elements with one call, it is possible to append more argument sets to the list.
E.g. '(0,0 50,0 50,0 50,50) for the two point pairs (0,0 50,0) and (50,0 50,50).
:2pos requires start-point and end-point
:horizontal requires start-point and length (or distance-point)
:vertical requires start-point and length (or distance-point)
:angle requires start-point , angle (or direction-point) and length (or distance-point)
:polygon requires a number of points
:rectangle requires corner-point and an opposite corner-point
owner_type {KEYWORD} - defines the type of an owner
:current-sheet - the current sheet is set to be the owner
:current-frame - the current frame is set to be the owner
:2dview - the view specified by :owner is set to be the owner
:sketch - the sketch specified by :owner is set to be the owner
owner {SEL_ITEM or PATHNAME} - only needed when owner_type is specified as :2dview or :sketch
SEL_ITEM representing either
a Creo Elements/Direct Modeling Object (applicable for views only) or
an Annotation Object
complete PATHNAME describing
a Creo Elements/Direct Modeling Object (applicable for views only) ; e.g. "/p1/vs1/front1" or
an Annotation Object ; e.g. "1/front1"
Return Value:
T - owner was valid and line created
nil - an error occured
Examples:
(sd-am-create-geo-straight :2pos (list 0,0 100,100) :owner_type :current-frame)
a general example for some "create" functions is listed here

Function Index Top of Page

SD-AM-CREATE-GEO-CIRCULAR  [function]

(sd-am-create-geo-circular method
                           arg_lst
                           :owner_type owner_type
                           :owner owner)
Description:
Create a circular geometry element (circle or arc)
Parameters:
method {KEYWORD} - method to create the circle or arc
:radius - circle by center-point and its radius
:3pos - circle by three points on its circumference
:arc_center - arc by a center-point and two more points
:arc_3pos - arc specified by three points
arg_lst {LIST} - list of arguments needed for the given method
To draw multiple elements with one call, it is possible to append more argument sets to the list.
E.g. '(0,0 5 50,50 100) for the two pairs (0,0 5) and (50,0 100).
:radius requires center-point and radius (or a point on radius)
:3pos requires first point , second point and third point
:arc_center requires center-point , start-point and end-point
:arc_3pos requires start-point , end-point and third point
owner_type {KEYWORD} - defines the type of an owner
:current-sheet - the current sheet is set to be the owner
:current-frame - the current frame is set to be the owner
:2dview - the view specified by :owner is set to be the owner
:sketch - the sketch specified by :owner is set to be the owner
owner {SEL_ITEM or PATHNAME} - only needed when owner_type is specified as :2dview or :sketch
SEL_ITEM representing either
a Creo Elements/Direct Modeling Object (applicable for views only) or
an Annotation Object
complete PATHNAME describing
a Creo Elements/Direct Modeling Object (applicable for views only) ; e.g. "/p1/vs1/front1" or
an Annotation Object ; e.g. "1/front1"
Return Value:
T - owner was valid and geometry element created
nil - an error occured
Examples:
(sd-am-create-geo-circular :radius (list 0,0 50) :owner_type :current-frame)
a general example for some "create" functions is listed here

Function Index Top of Page

SD-AM-CREATE-GEO-SPLINE  [function]

(sd-am-create-geo-spline method
                         pnt_lst
                         :owner_type owner_type
                         :owner owner
                         :closed close)
Description:
Draw a B-Spline curve using interpolation or control points
Parameters:
method {KEYWORD} - method to create the B-spline
:control - use a series of control points guiding the curve
:interpolation - use a sequence of interpolation points, through which the curve will pass
pnt_lst {LIST of GPNT2Ds} - list of points defining the spline
owner_type {KEYWORD} - defines the type of an owner
:current-sheet - the current sheet is set to be the owner
:current-frame - the current frame is set to be the owner
:2dview - the view specified by :owner is set to be the owner
:sketch - the sketch specified by :owner is set to be the owner
owner {SEL_ITEM or PATHNAME} - only needed when owner_type is specified as :2dview or :sketch
SEL_ITEM representing either
a Creo Elements/Direct Modeling Object (applicable for views only) or
an Annotation Object
complete PATHNAME describing
a Creo Elements/Direct Modeling Object (applicable for views only) ; e.g. "/p1/vs1/front1" or
an Annotation Object ; e.g. "1/front1"
close {BOOLEAN} - (optional) closes the spline
Return Value:
T - owner was valid and geometry element created
nil - an error occured
Example:
(sd-am-create-geo-spline :interpolation (list 0,0 50,0 50,50) :closed T :owner_type :current-sheet)

Function Index Top of Page

SD-AM-CREATE-TEXT  [function]

(sd-am-create-text :text text
                   :position position
                   :owner_type owner_type
                   :owner owner)
Description:
Add text to a drawing
Parameters:
text {STRING} - text to be positioned in the drawing
position {GPNT2D} - coordinates of the string position
owner_type {KEYWORD} - defines the type of an owner
:current-sheet - the current sheet is set to be the owner
:current-frame - the current frame is set to be the owner
:2dview - the view specified by :owner is set to be the owner
:sketch - the sketch specified by :owner is set to be the owner
owner {SEL_ITEM or PATHNAME} - only needed when owner_type is specified as :2dview or :sketch
SEL_ITEM representing either
a Creo Elements/Direct Modeling Object (applicable for views only) or
an Annotation Object
complete PATHNAME describing
a Creo Elements/Direct Modeling Object (applicable for views only) ; e.g. "/p1/vs1/front1" or
an Annotation Object ; e.g. "1/front1"
Return Value:
T - owner was valid and text created
nil - an error occured
Examples:
(sd-am-create-text :text "Welcome to Annotation" :position 0,0 :owner_type :2dview :owner "1/top1")
a general example for some "create" functions is listed here

Function Index Top of Page

SD-AM-CREATE-SKETCH  [function]

(sd-am-create-sketch :name name
                     :position position
                     :owner_type owner_type
                     :owner owner)
Description:
Create a new sketch on the drawing
Parameters:
name {STRING} - name of the sketch
position {GPNT2D} - reference point of the sketch
owner_type {KEYWORD} - defines the type of an owner
:current-sheet - the current sheet is set to be the owner
:current-frame - the current frame is set to be the owner
:2dview - the view specified by :owner is set to be the owner
:sketch - the sketch specified by :owner is set to be the owner
owner {SEL_ITEM or PATHNAME} - only needed when owner_type is specified as :2dview or :sketch
SEL_ITEM representing either
a Creo Elements/Direct Modeling Object (applicable for views only) or
an Annotation Object
complete PATHNAME describing
a Creo Elements/Direct Modeling Object (applicable for views only) ; e.g. "/p1/vs1/front1" or
an Annotation Object ; e.g. "1/front1"
Return Value:
T - owner was valid and sketch created
nil - an error occured
Example:
(sd-am-create-sketch :name "Test" :position 0,0 :owner_type :2dview :owner "/p1/vs1/iso1")

Function Index Top of Page

SD-AM-LOAD-SKETCH  [function]

(sd-am-load-sketch :file_name file_name
                   :position position
                   :owner_type owner_type
                   :owner owner
                   :adjust adjustment)
Description:
Load a sketch into the current Annotation drawing
Parameters:
file_name {STRING} - name of the sketch (*.MI) file to load
position {GPNT2D} - reference point of the sketch
owner_type {KEYWORD} - defines the type of an owner
:current-sheet - the current sheet is set to be the owner
:current-frame - the current frame is set to be the owner
:2dview - the view specified by :owner is set to be the owner
:sketch - the sketch specified by :owner is set to be the owner
owner {SEL_ITEM or PATHNAME} - only needed when owner_type is specified as :2dview or :sketch
SEL_ITEM representing either
a Creo Elements/Direct Modeling Object (applicable for views only) or
an Annotation Object
complete PATHNAME describing
a Creo Elements/Direct Modeling Object (applicable for views only) ; e.g. "/p1/vs1/front1" or
an Annotation Object ; e.g. "1/front1"
adjustment {KEYWORD} - (optional) specifies the adjustment for the reference point
:upper_left
:upper_middle
:upper_right
:middle_left
:middle_middle
:middle_right
:lower_left
:lower_middle
:lower_right
Return Value:
T - owner was valid and sketch loaded
nil - an error occured
Examples:
(sd-am-load-sketch :file_name "test.mi" :position 0,0 :adjust :upper_left :current-sheet :adjust )
a general example for some "create" functions is listed here
[Integration Kit Contents] [Integration Kit What's New] [Integration Kit Function Index] [More Documentation] [PTC]
© 2023 Parametric Technology GmbH
(a subsidiary of PTC Inc.), All Rights Reserved