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

2D Object Inquiries

Structures:
sd-am-sheet-struct
sd-am-view-struct
sd-am-view-settings-struct
sd-am-view-set-struct

Predicates:
sd-am-sheet-p
sd-am-frame-p
sd-am-sketch-p
sd-am-view-p
sd-am-flat-p
sd-am-view-set-p

Generic Inquiries:
sd-am-inq-unique-name
sd-am-inq-name

Specific Inquiries:
sd-am-inq-default-drawing-no
sd-am-inq-drawing-no
sd-am-inq-drawing-scale
sd-am-inq-drawing-selected-owner
sd-am-inq-all-sheets
sd-am-inq-curr-sheet
sd-am-inq-curr-sheet-name
sd-am-inq-sheet
sd-am-inq-all-sketches
sd-am-inq-all-view-sets
sd-am-inq-curr-view-set
sd-am-inq-view-set
sd-am-inq-view-set-dirs
sd-am-inq-view
sd-am-inq-all-3d-owners
sd-am-inq-registered-frames
sd-am-inq-default-view-settings
sd-am-inq-view-settings
sd-am-inq-curr-primary-lang
sd-am-inq-curr-secondary-lang

Concepts

2D Objects are items that represent Creo Elements/Direct Drafting parts, i.e.

All 2D object inquiries are based on the 2D objects data that have been valid after the most recent *DOCU-CHANGE-OBJECT-TREE-EVENT*. All Annotation commands which create or delete 2D objects, or which alter the relationships between 2D objects, automatically launch this event after their execution to update the 2D objects data.

The programmer has to launch the *DOCU-CHANGE-OBJECT-TREE-EVENT* each time after 2D objects have been created or deleted, or after the relationships between 2D objects have been changed, other than by calling Annotation commands and functions described in the Annotation Reference Manual.

Function Index Top of Page

SD-AM-SHEET-STRUCT  [structure]

(sd-am-sheet-struct-p        sd-am-sheet-struct)
(sd-am-sheet-struct-name     sd-am-sheet-struct)
(sd-am-sheet-struct-frame    sd-am-sheet-struct)
(sd-am-sheet-struct-views    sd-am-sheet-struct)
(sd-am-sheet-struct-flats    sd-am-sheet-struct)
(sd-am-sheet-struct-sketches sd-am-sheet-struct)
(sd-am-sheet-struct-scale    sd-am-sheet-struct)
(sd-am-sheet-struct-corners  sd-am-sheet-struct)
Description:
Contains the data that can be inquired from a sheet.
Slots:
name {STRING} - The name of the sheet.
frame {SEL_ITEM} - The sheet frame.
views {LIST of SEL_ITEMs} - The list of views contained in the sheet.
flats {LIST of SEL_ITEMs} - The list of flats contained in the sheet.
sketches {LIST of SEL_ITEMs} - The list of sketches contained in the sheet.
scale {LONG-FLOAT} - The sheet scale.
corners {LIST of GPNT2D} - The lower left and upper right corner of all elements belonging to the frame of the sheet.
See Also:
SD-AM-INQ-SHEET [function]

Function Index Top of Page

SD-AM-VIEW-STRUCT  [structure]

(sd-am-view-struct-p           sd-am-view-struct)
(sd-am-view-struct-name        sd-am-view-struct)
(sd-am-view-struct-sheet       sd-am-view-struct)
(sd-am-view-struct-view-set    sd-am-view-struct)
(sd-am-view-struct-view-3d     sd-am-view-struct)
(sd-am-view-struct-type        sd-am-view-struct)
(sd-am-view-struct-parent-view sd-am-view-struct)
(sd-am-view-struct-child-views sd-am-view-struct)
(sd-am-view-struct-parts-3d    sd-am-view-struct)
(sd-am-view-struct-dir         sd-am-view-struct)
(sd-am-view-struct-up-dir      sd-am-view-struct)
(sd-am-view-struct-scale       sd-am-view-struct)
(sd-am-view-struct-offset      sd-am-view-struct)
(sd-am-view-struct-rot-angle   sd-am-view-struct)
(sd-am-view-struct-up-to-date  sd-am-view-struct)
(sd-am-view-struct-configuration sd-am-view-struct)
Description:
Contains the data that can be inquired from a view. Please note that if view-3d is nil (i.e. the 3D model is not loaded) then all 3D related data will be undefined. This applies for the slots
view-set
view-3d
parts-3d
parent-view
child-views
dir
up-dir
up-to-date
configuration

In case of a flat, the following slots are undefined:

view-set
view-3d
parent-view
child-views
dir
up-dir
configuration
Slots:
name {STRING} - The view name.
sheet {SEL_ITEM} - The sheet to which the view belongs to.
view-set {SEL_ITEM} - The view set to which the view belongs to.
view-3d {SEL_ITEM} - The corresponding 3D view in the view set.
type {STRING} - 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"
"GENERAL"
"SECTION"
"ALIGNED_SECTION"
"DETAIL"
"PARTIAL"
"FLAT"
"FLAT_DETAIL"
"FLAT_PARTIAL"
parent-view {SEL_ITEM} - The parent view (for section and detail views only).
child-views {LIST of SEL_ITEM} - The derived child views, i.e. section and detail views.
parts-3d {LIST of SEL_ITEMs} - The list of all 3D parts contained in the view.
dir {GPNT3D} - The view normal direction.
up-dir {GPNT3D} - The view up direction.
scale {LONG-FLOAT} - The absolute view scale.
offset {GPNT2D} - The view offset on the sheet.
rot-angle {LONG-FLOAT} - The view angle on the sheet.
up-to-date {BOOLEAN} - t indicates that the view is up to date. nil indicates that the view needs an update.
configuration {SEL_ITEM} - The configuration assigned to the view.
See Also:
SD-AM-INQ-VIEW [function]

Function Index Top of Page

SD-AM-VIEW-DEFAULT-SETTINGS-STRUCT  [structure]

(sd-am-view-default-settings-struct-p                       sd-am-view-default-settings-struct)
(sd-am-view-default-settings-struct-hidden-lines-calc       sd-am-view-default-settings-struct)
(sd-am-view-default-settings-struct-hidden-lines-color      sd-am-view-default-settings-struct)
(sd-am-view-default-settings-struct-hidden-lines-ltype      sd-am-view-default-settings-struct)
(sd-am-view-default-settings-struct-hidden-lines-pensize    sd-am-view-default-settings-struct)
(sd-am-view-default-settings-struct-hidden-lines-linesize   sd-am-view-default-settings-struct)
(sd-am-view-default-settings-struct-tangent-lines-color     sd-am-view-default-settings-struct)
(sd-am-view-default-settings-struct-tangent-lines-ltype     sd-am-view-default-settings-struct)
(sd-am-view-default-settings-struct-tangent-lines-pensize   sd-am-view-default-settings-struct)
(sd-am-view-default-settings-struct-tangent-lines-linesize  sd-am-view-default-settings-struct)
(sd-am-view-default-settings-struct-normal-lines-part-color sd-am-view-default-settings-struct)
(sd-am-view-default-settings-struct-normal-lines-color      sd-am-view-default-settings-struct)
(sd-am-view-default-settings-struct-normal-lines-ltype      sd-am-view-default-settings-struct)
(sd-am-view-default-settings-struct-normal-lines-pensize    sd-am-view-default-settings-struct)
(sd-am-view-default-settings-struct-normal-lines-linesize   sd-am-view-default-settings-struct)
(sd-am-view-default-settings-struct-iso-mode                sd-am-view-default-settings-struct)
Description:
Contains the settings of a view.
Slots:
hidden-lines-calc {BOOLEAN} - t means that hidden lines calculation is enabled. nil means that hidden lines calculation is disabled.
hidden-lines-color {GPNT3D} - R,G,B color vector for hidden lines display.
hidden-lines-ltype {KEYWORD} - Line type for hidden lines display. Must be either a linetype or :INVISIBLE.
hidden-lines-pensize {FLOAT} - Pen size for hidden lines display. nil means linesize activ.
hidden-lines-linesize {FLOAT} - Line size for hidden lines display. nil means pensize activ.
tangent-lines-color {GPNT3D} - R,G,B color vector for tangent lines display.
tangent-lines-ltype {KEYWORD} - Line type for tangent lines display. Must be either a linetype or :NONE.
tangent-lines-pensize {FLOAT} - Pen size for tangent lines display. nil means linesize activ.
tangent-lines-linesize {FLOAT} - Line size for tangent lines display. nil means pensize activ.
normal-lines-part-color {BOOLEAN} - t indicates that normal lines are displayed using the 3D part colors. nil indicates that normal lines are displayed using normal-lines-color.
normal-lines-color {GPNT3D} - R,G,B color vector for normal lines display, if part color usage is not enabled.
normal-lines-ltype {KEYWORD} - Line type for hidden lines display. Must be a linetype.
normal-lines-pensize {FLOAT} - Pen size for hidden lines display. nil means linesize activ.
normal-lines-linesize {FLOAT} - Line size for hidden lines display. nil means pensize activ.
iso-mode {STRING} - The isometric mode. Must be either "TRUE", "30" or "60".
See Also:
SD-AM-INQ-DEFAULT-VIEW-SETTINGS [function]

Function Index Top of Page

SD-AM-VIEW-SETTINGS-STRUCT  [structure]

(sd-am-view-settings-struct-p                       sd-am-view-settings-struct)
(sd-am-view-settings-struct-hidden-lines-calc       sd-am-view-settings-struct)
(sd-am-view-settings-struct-hidden-lines-color      sd-am-view-settings-struct)
(sd-am-view-settings-struct-hidden-lines-ltype      sd-am-view-settings-struct)
(sd-am-view-settings-struct-hidden-lines-pensize    sd-am-view-settings-struct)
(sd-am-view-settings-struct-hidden-lines-linesize   sd-am-view-settings-struct)
(sd-am-view-settings-struct-tangent-lines-color     sd-am-view-settings-struct)
(sd-am-view-settings-struct-tangent-lines-ltype     sd-am-view-settings-struct)
(sd-am-view-settings-struct-tangent-lines-pensize   sd-am-view-settings-struct)
(sd-am-view-settings-struct-tangent-lines-linesize  sd-am-view-settings-struct)
(sd-am-view-settings-struct-normal-lines-part-color sd-am-view-settings-struct)
(sd-am-view-settings-struct-normal-lines-color      sd-am-view-settings-struct)
(sd-am-view-settings-struct-normal-lines-ltype      sd-am-view-settings-struct)
(sd-am-view-settings-struct-normal-lines-pensize    sd-am-view-settings-struct)
(sd-am-view-settings-struct-normal-lines-linesize   sd-am-view-settings-struct)
Description:
Contains the settings of a view.
Slots:
hidden-lines-calc {BOOLEAN} - t means that hidden lines calculation is enabled. nil means that hidden lines calculation is disabled.
hidden-lines-color {GPNT3D} - R,G,B color vector for hidden lines display.
hidden-lines-ltype {KEYWORD} - Line type for hidden lines display. Must be either a linetype or :INVISIBLE.
hidden-lines-pensize {FLOAT} - Pen size for hidden lines display. nil means linesize activ.
hidden-lines-linesize {FLOAT} - Line size for hidden lines display. nil means pensize activ.
tangent-lines-pensize {FLOAT} - Pen size for tangent lines display. nil means linesize activ.
tangent-lines-linesize {FLOAT} - Line size for tangent lines display. nil means pensize activ.
tangent-lines-color {GPNT3D} - R,G,B color vector for tangent lines display.
tangent-lines-ltype {KEYWORD} - Line type for tangent lines display. Must be either a linetype or :NONE.
normal-lines-part-color {BOOLEAN} - t indicates that normal lines are displayed using the 3D part colors. nil indicates that normal lines are displayed using normal-lines-color.
normal-lines-color {GPNT3D} - R,G,B color vector for normal lines display, if part color usage is not enabled.
normal-lines-ltype {KEYWORD} - Line type for hidden lines display. Must be a linetype.
normal-lines-pensize {FLOAT} - Pen size for hidden lines display. nil means linesize activ.
normal-lines-linesize {FLOAT} - Line size for hidden lines display. nil means pensize activ.
See Also:
SD-AM-INQ-VIEW-SETTINGS [function]

Function Index Top of Page

SD-AM-VIEW-SET-STRUCT  [structure]

(sd-am-view-set-struct-p      sd-am-view-set-struct)
(sd-am-view-set-struct-name   sd-am-view-set-struct)
(sd-am-view-set-struct-owner  sd-am-view-set-struct)
(sd-am-view-set-struct-views  sd-am-view-set-struct)
Description:
Contains the data that can be inquired from a view set.
Slots:
name {STRING} - The view set name.
owner {SEL_ITEM} - The part or assembly owning the view set.
views {LIST of key/value lists} - The list of view pair lists for all 3D views in the view set, where each view pair consists of the 3D view SEL_ITEM and the corresponding 2D view SEL_ITEM, both preceded by the keywords :view-3d and :view-2d. If a 2D view is nil, then the appropriate sheet containing this view has not been loaded.
See Also:
SD-AM-INQ-VIEW-SET [function]

Function Index Top of Page

SD-AM-SHEET-P  [function]

(sd-am-sheet-p item) 
Description:
Predicate to determine whether an item is a sheet.
Parameters:
item {SEL_ITEM} - The item to inquire.
Return Value:
t - The item is a sheet.
nil - The item is not a sheet.

Function Index Top of Page

SD-AM-FRAME-P  [function]

(sd-am-frame-p item) 
Description:
Predicate to determine whether an item is a frame.
Parameters:
item {SEL_ITEM} - The item to inquire.
Return Value:
t - The item is a frame.
nil - The item is not a frame.

Function Index Top of Page

SD-AM-SKETCH-P  [function]

(sd-am-sketch-p item) 
Description:
Predicate to determine whether an item is a sketch.
Parameters:
item {SEL_ITEM} - The item to inquire.
Return Value:
t - The item is a sketch.
nil - The item is not a sketch.

Function Index Top of Page

SD-AM-VIEW-P  [function]

(sd-am-view-p item) 
Description:
Predicate to determine whether an item is a view.
Parameters:
item {SEL_ITEM} - The item to inquire.
Return Value:
t - The item is a view.
nil - The item is not a view.

Function Index Top of Page

SD-AM-FLAT-P  [function]

(sd-am-flat-p item) 
Description:
Predicate to determine whether an item is a flat
Parameters:
item {SEL_ITEM} - The item to inquire.
Return Value:
t - The item is a flat.
nil - The item is not a flat.

Function Index Top of Page

SD-AM-VIEW-SET-P  [function]

(sd-am-view-set-p item) 
Description:
Predicate to determine whether an item is a view-set.
Parameters:
item {SEL_ITEM} - The item to inquire.
Return Value:
t - The item is a view set.
nil - The item is not a view set.

Function Index Top of Page

SD-AM-INQ-UNIQUE-NAME  [function]

(sd-am-inq-unique-name item) 
Description:
If item is a sheet, view, sketch or a frame, then the item's unique Creo Elements/Direct Drafting part name is returned.
Otherwise the unique Creo Elements/Direct Drafting part name of the appropriate parent sheet, view, frame or sketch, to which item belongs, is returned.
Parameters:
item {SEL_ITEM} - the item to inquire.
Return Value:
{STRING} - the unique Creo Elements/Direct Drafting part name.
nil - An error occured.

Function Index Top of Page

SD-AM-INQ-NAME  [function]

(sd-am-inq-name item) 
Description:
If item is a sheet, view, sketch or a frame, then the item's Creo Elements/Direct Drafting part name is returned.
Otherwise the Creo Elements/Direct Drafting part name of the appropriate parent sheet, view, frame or sketch, to which item belongs, is returned.
Parameters:
item {SEL_ITEM} - the item to inquire.
Return Value:
{STRING} - the Creo Elements/Direct Drafting part name.
nil - An error occured.

Function Index Top of Page

SD-AM-INQ-DEFAULT-DRAWING-NO  [function]

(sd-am-inq-default-drawing-no) 
Description:
Returns the default drawing number.
Parameters:
Return Value:
{STRING} - The drawing number.
nil - An error occured.

Function Index Top of Page

SD-AM-INQ-DRAWING-NO  [function]

(sd-am-inq-drawing-no) 
Description:
Returns the number of the current drawing.
Parameters:
Return Value:
{STRING} - The drawing number.
nil - An error occured.

Function Index Top of Page

SD-AM-INQ-DRAWING-SCALE  [function]

(sd-am-inq-drawing-scale) 
Description:
Returns the drawing scale, used as default scale for new sheets.
Parameters:
Return Value:
{LONG-FLOAT} - The drawing scale.
nil - An error occured.

Function Index Top of Page

SD-AM-INQ-DRAWING-SELECTED-OWNER  [function]

(sd-am-inq-drawing-selected-owner) 
Description:
Returns the owner of the drawing selected during drawing creation. Should only be used inside AM_SET_DEFAULT_DRAWING_NUMBER.
Parameters:
Return Value:
{SEL_ITEM} - The item selected as new drawing owner.
nil - An error occured.

Function Index Top of Page

SD-AM-INQ-ALL-SHEETS  [function]

(sd-am-inq-all-sheets) 
Description:
Returns a list of all sheets in the current drawing.
Parameters:
Return Value:
{LIST of SEL_ITEMs} - The list of sheets.
nil - An error occured.

Function Index Top of Page

SD-AM-INQ-CURR-SHEET  [function]

(sd-am-inq-curr-sheet) 
Description:
Returns the current sheet.
Parameters:
Return Value:
{SEL_ITEM} - The current sheet.
nil - An error occured.

Function Index Top of Page

SD-AM-INQ-CURR-SHEET-NAME  [function]

(sd-am-inq-curr-sheet-name) 
Description:
Returns the name of the current sheet.
Parameters:
Return Value:
{STRING} - The current sheet name.
nil - An error occured.

Function Index Top of Page

SD-AM-INQ-SHEET  [function]

(sd-am-inq-sheet sheet) 
Description:
Returns a structure with the data of a given sheet.
Parameters:
sheet {SEL_ITEM} - The sheet to inquire.
Return Value:
{SD-AM-SHEET-STRUCT} - The inquired data.
nil - An error occured.

Function Index Top of Page

SD-AM-INQ-ALL-SKETCHES  [function]

(sd-am-inq-all-sketches item) 
Description:
Returns a list of all sketches within the given item. Item can be a sheet, frame, view or sketch.
Parameters:
item {SEL_ITEM} - The item to inquire.
Return Value:
{LIST of SEL_ITEMs} - The inquired data.
nil - An error occured.

Function Index Top of Page

SD-AM-INQ-ALL-VIEW-SETS  [function]

(sd-am-inq-all-view-sets) 
Description:
Returns a list of all view sets.
Parameters:
Return Value:
{LIST of SEL_ITEMs} - The list of view sets.
nil - No view sets defined or an error occured.

Function Index Top of Page

SD-AM-INQ-CURR-VIEW-SET  [function]

(sd-am-inq-curr-view-set) 
Description:
Returns the current view set.
Parameters:
Return Value:
{SEL_ITEM} - The current view set.
nil - No current view set defined or an error occured.

Function Index Top of Page

SD-AM-INQ-VIEW-SET  [function]

(sd-am-inq-view-set viewset) 
Description:
Returns a structure with data of the specified view set.
Parameters:
viewset {SEL_ITEM} - The view set to inquire.
Return Value:
{SD-AM-VIEW-SET-STRUCT} - The view set data.
nil - An error occured.

Function Index Top of Page

SD-AM-INQ-VIEW-SET-DIRS  [function]

(sd-am-inq-view-set-dirs viewset) 
Description:
Returns a list with front and up directions of the passed view set.
Parameters:
viewset {SEL_ITEM} - The view set to inquire.
Return Value:
{LIST of two 3D vectors} - The front and up directions of the view set.
nil - An error occured.

Function Index Top of Page

SD-AM-INQ-VIEW  [function]

(sd-am-inq-view view) 
Description:
Returns a structure with data of the specified view.
Parameters:
view {SEL_ITEM} - The view to inquire.
Return Value:
{SD-AM-VIEW-STRUCT} - The view data.
nil - An error occured.

Function Index Top of Page

SD-AM-INQ-REGISTERED-FRAMES  [function]

(sd-am-inq-registered-frames) 
Description:
Returns a list of all registered frames.
Parameters:
Return Value:
{LIST of key/value LISTs} - A list containing a key/value list per frame with the following keys:
:ui-name {STRING} - The name shown by Annotation.
:wm-name {STRING} - The name shown by WorkManager.
:file {STRING} - The file containing the frame.
nil - No frames have been registered.

Function Index Top of Page

SD-AM-INQ-DEFAULT-VIEW-SETTINGS  [function]

(sd-am-inq-default-view-settings) 
Description:
Returns a structure with the default view settings.
Parameters:
Return Value:
{SD-AM-VIEW-SETTINGS-STRUCT} - The inquired settings.
nil - An error occured.

Function Index Top of Page

SD-AM-INQ-VIEW-SETTINGS  [function]

(sd-am-inq-view-settings view) 
Description:
Returns a structure with the settings of the specified view.
Parameters:
view {SEL_ITEM} - The view to inquire the settings.
Return Value:
{SD-AM-VIEW-SETTINGS-STRUCT} - The inquired settings.
nil - An error occured.

Function Index Top of Page

SD-AM-INQ-ALL-3D-OWNERS  [function]

(sd-am-inq-all-3d-owners) 
Description:
Returns the owning 3D parts or assemblies of all 2D views and flats in the drawing, and which of them are currently loaded.
Parameters:
Return Value:
{LIST of sub LIST s} - One sub LIST per 2D view or flat with the following structures:
(view-2D owning-3D-part-or-assembly) for 2D views
(flat owning-3D-part) for flats

If the 3D part or assembly owning the 2D view or flat is not currently loaded, its sysid is returned, otherwise all data are SEL_ITEMs.

nil - An error occured.
See Also:
sd-inq-obj-sysid [function]
sd-sysid-to-obj [function]

Function Index Top of Page

SD-AM-INQ-CURR-PRIMARY-LANG  [function]

(sd-am-inq-curr-primary-lang) 
Description:
Returns the current Primary language of Multi-Language drawing.
Parameters:
Return Value:
:ENGLISH - Current primary language of Multi-Language drawing is English.
:GERMAN - Current primary language of Multi-Language drawing is German.
:FRENCH - Current primary language of Multi-Language drawing is French.
:ITALIAN - Current primary language of Multi-Language drawing is Italian.
:CHINESE - Current primary language of Multi-Language drawing is Chinese.
:JAPANESE - Current primary language of Multi-Language drawing is Japanese.
nil - Current drawing does not have Multi-Language texts.
Example:
(sd-am-inq-curr-primary-lang)
=> :ENGLISH

Function Index Top of Page

SD-AM-INQ-CURR-SECONDARY-LANG  [function]

(sd-am-inq-curr-secondary-lang) 
Description:
Returns the current secondary language of Multi-Language drawing.
Parameters:
Return Value:
:ENGLISH - Current secondary language of Multi-Language drawing is English.
:GERMAN - Current secondary language of Multi-Language drawing is German.
:FRENCH - Current secondary language of Multi-Languagedrawing is French.
:ITALIAN - Current secondary language of Multi-Language drawing is Italian.
:CHINESE - Current secondary language of Multi-Language drawing is Chinese.
:JAPANESE - Current secondary language of Multi-Languagedrawing is Japanese.
:NONE - Current secondary language of Multi-Language drawing is None (i.e not set).
nil - Current drawing does not have Multi-Language texts.
Example:
(sd-am-inq-curr-secondary-lang)
=> :GERMAN
[Integration Kit Contents] [Integration Kit What's New] [Integration Kit Function Index] [More Documentation] [PTC]
© 2024 Parametric Technology GmbH
(a subsidiary of PTC Inc.), All Rights Reserved