Top Solid API
Top Solid API
Welcome
This document describes the available objects and interfaces exposed by TopSolid that
will allow you to automatize frequent tasks, so you (or your customer if you are a third
party developer) may achieve a productivity improvement.
This on-line help assumes that you are a fully trained TopSolid user, as all the usual
TopSolid terminology (assembly, draft, component, shape, curve, layer, ..) will be used
without any explanation (you will find some in the TopSolid on-line help).
If you read this for the first time, you may wonder what is the best (and fastest) way to
know out to use the TopSolid API...
Go through the other chapters quickly to see how they are structured, so that you
will be able to find the right information when needed.
1
Welcome
Enjoy!
To download the last version of the TopSolid 2008 Automation API on-line help, click
here.
2
Welcome
Automation
This means that you may develop programs to drive TopSolid using standard tools like
Microsoft Visual Basic.
As it is expected that this will be the most common way to automatize TopSolid
tasks, this on-line help assumes that you are familiar with VB, and will use VB to
develop programs to drive TopSolid.
To do so, first use the "References..." command of the "Project" menu and activate
the "TopSolid v6.9 Type Library" that should be part of the list (if not, you need to run
TopSolid once on your machine).
Once this is done, you will have an easy access to all of the API interfaces, with
some help from VB...
3
Welcome
Multiple interfaces
For example, design documents ("*.top" files) are accessible through DocumentDesign
objects, which support two interfaces, IDocument for general document handling, and
IDocumentDesign for design document specific functionalities.
This means that one single object may implement several (what is known as
"IDispatch") interfaces, and one will need to switch from one to another to access the
full set of available methods and properties.
For instance, you may write the following VB code to access the SaveAs method of
the IDocument interface of a DocumentDesign object :
...
TopDoc.SaveAs ("test.top")
...
4
Welcome
To make it easier, most interfaces provide a property that allows you to get the base
interface without actually explicitly going through another pointer.
For instance, the IDocumentDesign interface contains the Document property that just
does that, and therefore the previous code may be simplified like this :
...
TopDocDgn.Document.SaveAs ("test.top")
...
5
Welcome
Script languages
Unlike VB, script languages cannot manage objects with multiple interfaces
directly.
Usually, this will be the case, but if it is not, then it is the method/property of the
first interface that will be called (the ordered list of the interfaces implemented by
each object is given in the object description page).
6
Welcome
Program units
By default, values are always input and output in reference units : angles in
degrees, lengths in meters.
Usually, most programs will only set the application program units once at the
beginning, and forget about it.
However, there is one case where one should be careful : if several Automation
client programs are supposed to run in parallel on the same TopSolid instance, one of
them may change the program units to a setting that would not please another one...
In this case, checking for correct program units is needed before performing actions
that would involve exchanging values with TopSolid.
7
Welcome
Coordinates
Driving TopSolid often involves sending or receiving points or vectors (to define
directions or axes), using (x, y, z) Cartesian coordinates.
By convention, these coordinates are always expressed in length program units, and
are relative to the current coordinate system (or current draft view for draft
documents) of the involved document.
For instance, the following code will create a point on the X axis of the current
coordinate system of the document, at 20mm from the origin :
...
TopDoc.Document.ProgramUnitLength = "mm"
TopPnt = TopDoc.Points.AddBasic(20, 0, 0)
...
8
Welcome
The root object Application gives access to all of the internal objects.
It contains three main collections : the Contexts, the Extensions, and the Documents.
The Contexts collection contains all the available contexts, with at least the
TopSolid standard ContextDesign and ContextDraft, and possibly more depending on
the installed TopSolid based applications.
There is one context per type of document supported. The context allows controlling
the management of this particular type of document, it is also used to create new
documents of this type with specific arguments (unlike with the Add method of the
Documents collection).
The Documents collection contains all the documents loaded in memory, which is all
the displayed documents (with Visible property set to True) plus all their directly or
indirectly referenced documents.
All documents share the same common IDocument interface to deal with general use.
To reach their specific features, it is needed to perform a cast to another interface
(IDocumentDesign for DocumentDesign object, ...).
9
Welcome
Some TopSolid based application may not expose any extra interface to give access
to the specific features of the types of documents they support, in which case driving
them though Automation will be limited to what is available in IDocument.
Each Document, whatever its type is, contains at least one collection accessible
through the common IDocument interface : the Elements collection.
The Elements collection contains the actual elements that hold the specific model
representation of the document.
All elements share the same common IElement interface to deal with general use, to
reach their specific features, it is needed to perform a cast to another interface
(IParameter for a Parameter object, ...).
10
Welcome
Undocumented objects
If you scan all the available objects and interfaces of the API with some
development tools, you will see that there are more to it than what is currently
documented here.
You should not try and use these undocumented features, as they are only for
internal use, and may change or disappear without notice from one patch to another.
11
Welcome
Creation version
In most new releases of TopSolid, new objects, interfaces and methods or properties
are made available.
Created: v<version>
Where <version> is the number of the version in which it has appeared for the first
time.
To do so, the simplest way is to check for the version number of TopSolid at the
beginning of your program (ex: Checking for version).
Your program will not run correctly (i.e. crash at some point) on any TopSolid which
version number is lower than the highest creation deletion version number of the
resources you need to access.
12
Welcome
Modification version
When this is the case, the version number in which the modification has occurred is
given at the top of the description page of the object/ interface/method/property, like
this:
Where <version> is the number of the version in which the implementation has been
modified, and <description of modification> is a short description of the modification.
13
Welcome
Obsolescence version
When this is the case, the version number in which the object/
interface/method/property has become obsolete is given at the top of its description
page, like this:
Where <version> is the number of the version in which it has become obsolete, and
<link to replacement> is a link to the newer better choice (if there is any).
Although using these resources will still work, it is highly recommended not to use
them in a new program, or to shortly switch existing programs to the superseding
ones, because they may well be more efficient, or offer more flexibility.
14
Welcome
Deletion version
When this is the case, the version number in which the deletion occurred is given at
the top of the description page of the object/ interface/method/property, like this:
Deleted: v<version>
Where <version> is the number of the version in which the implementation has
disappeared.
To do so, the simplest way is to check for the version number of TopSolid at the
beginning of your program (ex: Checking for version).
Your program will not run correctly (i.e. crash at some point) on any TopSolid which
version number is greater or equal to the lowest deletion version number of any of the
resources you need to access.
15
Welcome
For instance, if you have developed a VB program using TopSolid v6.5.212, you
should not let it run on TopSolid versions posterior to v6.5, and enforce this rule by
checking the version right after connecting to TopSolid.
16
Welcome
Application
Object
Version : 6.5
Description :
Interfaces
IApplication (default)
_IApplicationEvents (source).
17
Welcome
BOMProperty
Object
Version : 6.6
Description :
Interfaces
IBOMProperty (default)
18
Welcome
BOM
Object
Version : 6.6
Description :
Interfaces
IBOM (default)
19
Welcome
BOMLevel
Object
Version : 6.6
Description :
Interfaces
IBOMLevel (default)
20
Welcome
Component
Object
Version : 6.5
Description :
Interfaces
IComponent (default)
IElement.
21
Welcome
ContextDesign
Object
Version : 6.5
Description :
Interfaces
IContextDesign (default)
IContext.
22
Welcome
ContextDraft
Object
Version : 6.5
Description :
Interfaces
IContextDraft (default)
IContext.
23
Welcome
CoordinateSystem
Object
Version : 6.5
Description :
Interfaces
ICoordinateSystem (default)
IElement.
24
Welcome
Curve
Object
Version : 6.5
Description :
Interfaces
ICurve (default)
IElement.
25
Welcome
Dimension
Object
Version : 6.6
Description :
Interfaces
IDimension (default)
IElement.
26
Welcome
DocumentDesign
Object
Version : 6.5
Description :
Interfaces
IDocumentDesign (default)
IDocument
_IDocumentDesignEvents (source)
27
Welcome
DocumentDraft
Object
Version : 6.5
Description :
Interfaces
IDocumentDraft (default)
IDocument
_IDocumentDraftEvents (source)
28
Welcome
Drawing
Object
Version : 6.5
Description :
Interfaces
IDrawing (default)
IElement
29
Welcome
Parameter
Object
Version : 6.5
Description :
Interfaces
IParameter (default)
IElement
30
Welcome
Point
Object
Version : 6.5
Description :
Interfaces
IPoint (default)
IElement
31
Welcome
RefAxis
Object
Version : 6.5
Description :
Interfaces
IRefAxis (default)
IRef
32
Welcome
RefDirection
Object
Version : 6.5
Description :
Interfaces
IRefDirection (default)
IRef
33
Welcome
RefEdge
Object
Version : 6.5
Description :
Interfaces
IRefEdge (default)
IRef
34
Welcome
RefFace
Object
Version : 6.5
Description :
Interfaces
IRefFace (default)
IRef
35
Welcome
RefPlane
Object
Version : 6.5
Description :
Interfaces
IRefPlane (default)
IRef
36
Welcome
RefSegment
Object
Version : 6.5
Description :
Interfaces
IRefSegment default)
IRef
37
Welcome
Set
Object
Version : 6.5
Description :
Interfaces
ISet (default)
IElement
38
Welcome
Shape
Object
Version : 6.5
Description :
Interfaces
IShape (default)
IElement
39
Welcome
ShapeOperation
Object
Version : 6.5
Description :
Interfaces
IShapeOperation (default)
IShape
IElement
40
Welcome
ShapePart
Object
Version : 6.5
Description :
Interfaces
IShapePart (default)
IShape
IElement
41
Welcome
Text
Object
Version : 6.5
Description :
Interfaces
IText (default)
IElement
42
Welcome
IApplication
Interface
Version : 6.5
Description :
43
Welcome
ActiveDocument
Property
Version : 6.5
Description :
Use
IDocument = IApplication.ActiveDocument
Remarks
The active document is the document having the focus, its title bar is in a different
color, and it is displayed on top of all the other documents.
If there is no active document (for example when there is not any document loaded),
its value is Nothing.
44
Welcome
Application
Property
Version : 6.5
Description :
Use
IApplication = IApplication.Application
45
Welcome
Asks
Property
Version : 6.5
Description :
This property gives access to methods allowing to ask the user for some information
using TopSolid dialog bar.
Use
IAsks = IApplication.Asks
Remarks
In particular, it will be possible to query for points, edges, faces, and so on...
46
Welcome
Contexts
Property
Version : 6.5
Description :
Use
IContexts = IApplication.Contexts
47
Welcome
CurrentDocument
Property
Version : 6.5
Description :
Use
IDocument = IApplication.CurrentDocument
Remarks
The current document is the document where the elements are created, its title bar
contains the word "<<current>>".
If there is no current document (for example when there is not any document
loaded), its value is Nothing.
48
Welcome
DefaultPrinterName
Property
Version : 6.6
Description :
This property allows to get and set the default printer used for printing documents.
Use
String = IApplication.DefaultPrinterName
IApplication.DefaultPrinterName= String
49
Welcome
Documents
Property
Version : 6.5
Description :
Use
IDocuments = IApplication.Documents
50
Welcome
ExecuteMacro
Method
Version : 6.5
Description :
Use
IApplication.ExecuteMacro(Name)
Parameters
51
Welcome
ExecuteMacroKeepStack
Method
Version : 6.7
Description :
Use
IApplication.ExecuteMacroKeepStack(LipPath)
Parameters
52
Welcome
Extensions
Property
Version : 6.5
Description :
Use
IExtensions = IApplication.Extensions
53
Welcome
FullName
Property
Version : 6.5
Description :
This property gives the full path of the TopSolid executable, for example:
"C:\Missler\v67\bin\top67.exe".
Use
String = IApplication.FullName
54
Welcome
GetDoubleFromStack
Method
Version : 6.7
Description :
Use
Value = IApplication.GetDoubleFromStack
Parameters
55
Welcome
GetElementFromStack
Method
Version : 6.7
Description :
Use
Value = IApplication.GetElementFromStack
Parameters
56
Welcome
GetExportOption
Method
Version : 6.5
Description :
This method gets the value of an option of one of the available export translators.
Use
Parameters
Remarks
Example
57
Welcome
58
Welcome
GetImportOption
Method
Version : 6.5
Description :
This method gets the value of an option of one of the available import translators.
Use
Parameters
Remarks
Example
59
Welcome
60
Welcome
GetIntegerFromStack
Method
Version : 6.7
Description :
Use
Value = IApplication.GetIntegerFromStack
Parameters
61
Welcome
GetInterfaceExportOption
Method
Version : 6.5
Description :
This method gets the value of an option of the specified interface provided.
Use
Parameters
Remarks
62
Welcome
GetInterfaceImportOption
Method
Version : 6.5
Description :
This method gets the value of an option of the specified interface provided.
Use
Parameters
Remarks
63
Welcome
GetReferencedDocuments
Method
Version : 6.6
Description :
Use
IApplication.GetReferencedDocuments(DocPath)
Parameters
64
Welcome
GetStringFromStack
Method
Version : 6.7
Description :
Use
Value = IApplication.GetStringFromStack
Parameters
65
Welcome
GetTranslatorInfo
Method
Version : 6.6
Description :
Use
Parameters
Remarks
If the translator manages files with several extensions, this method returns the first
one of the list displayed in the TopSolid "Save As" or "Open" dialog box.
66
Welcome
InterfaceProviders
Property
Version : 6.7
Description :
This method allows to get all TopSolid interface providers to a given suffix.
Use
Parameters
67
Welcome
MainWindow
Property
Version : 6.6
Description :
Use
Long = IApplication.MainWindow
68
Welcome
Message
Method
Version : 6.7
Description :
Use
Parameters
69
Welcome
MoveDocumentsAndReferences
Method
Version : 6.6
Description :
This method moves list of documents and change each document references that point
to document of list.
Use
IApplication.MoveDocumentsAndReferences(DocPath)
Parameters
70
Welcome
Name
Property
Version : 6.5
Description :
Use
String = IApplication.Name
71
Welcome
Path
Property
Version : 6.5
Description :
This property gives the path to the TopSolid executable, for example:
"C:\Missler\v67\bin".
Use
String = IApplication.Path
72
Welcome
PrintBorder
Property
Version : 6.5
Description :
When this property is True, borders are drawn on the paper when printing a 3D
document..
Use
Boolean = IApplication.PrintBorder
IApplication.PrintBorder= Boolean
73
Welcome
PrintShaded
Property
Version : 6.5
Description :
When this property is False, shaded views of 3D documents are printed in wire frame
mode.
Use
Boolean = IApplication.PrintShaded
IApplication.PrintShaded= Boolean
74
Welcome
ProgramUnitAngle
Property
Version : 6.5
Description :
This property allows to get and set the angle unit used by the API.
Use
String = IApplication.ProgramUnitAngle
IApplication.ProgramUnitAngle = String
Remarks
The angle unit is defined by its symbol : "°" for degrees, "rad" for radians, ...
The list of all supported angle units is displayed in the "Angle" combo box of the
"Units" tab of TopSolid "File | Properties" panel.
When TopSolid is first started, the program angle unit is set to "°".
See also
75
Welcome
Program units.
Example
76
Welcome
ProgramUnitLength
Property
Version : 6.5
Description :
This property allows to get and set the length unit used by the API.
Use
String = IApplication.ProgramUnitLength
IApplication.ProgramUnitLength = String
Remarks
The length unit is defined by its symbol : "mm" for millimeters, "m" for meters, "in"
for inches, ...
The list of all supported length units is displayed in the "Length" combo box of the
"Units" tab of TopSolid "File | Properties" panel.
When TopSolid is first started, the program length unit is set to "m".
See also
77
Welcome
Example
78
Welcome
PushDoubleOnStack
Method
Version : 6.7
Description :
Use
IApplication.PushDoubleOnStack(Value)
Parameters
79
Welcome
PushElementOnStack
Method
Version : 6.7
Description :
Use
IApplication.PushElementOnStack(Value)
Parameters
80
Welcome
PushIntegerOnStack
Method
Version : 6.7
Description :
Use
IApplication.PushIntegerOnStack(Value)
Parameters
81
Welcome
PushStringOnStack
Method
Version : 6.7
Description :
Use
IApplication.PushStringOnStack(Value)
Parameters
82
Welcome
Quit
Method
Version : 6.5
Description :
Use
IApplication.Quit
Remarks
The method prompts the user to save documents that have changed before shutting
down TopSolid.
83
Welcome
Regenerate
Method
Version : 6.6
Description :
Use
IApplication.Regenerate(AskReadWrite)
Parameters
84
Welcome
SetExportOption
Method
Version : 6.5
Description :
This method allows to customize the behavior of the export translators, by setting the
value of one of the available options.
Use
Parameters
Remarks
The following options may be set (see TopSolid on-line help for options meaning) :
85
Welcome
unit : "mm", "cm", "m", "km", "µm", "ft", "in", "mil", "mile", "µin".
version : "2.5", "2.6", "9", "10", "11", "12", "13", "14", "2000".
Example
86
Welcome
SetImportOption
Method
Version : 6.5
Description :
This method allows to customize the behavior of the import translators, by setting the
value of one of the available options.
Use
Parameters
Remarks
The following options may be set (see TopSolid on-line help for options meaning) :
87
Welcome
unit : "mm", "cm", "m", "km", "µm", "ft", "in", "mil", "mile", "µin", "auto".
Example
88
Welcome
SetInterfaceExportOption
Method
Version : 6.5
Description :
This method sets the value of an option of the specified interface provided.
Use
Parameters
Remarks
89
Welcome
SetInterfaceImportOption
Method
Version : 6.5
Description :
This method sets the value of an option of the specified interface provided.
Use
Parameters
Remarks
90
Welcome
Synchronize
Method
Version : 6.5
Description :
This method synchronizes TopSolid after one or several calls to the Automation API.
Use
IApplication.Synchronize
Remarks
In particular, newly created elements will be displayed, and existing ones will be
updated to take into account the modifications.
91
Welcome
SynchronizeAuto
Property
Version : 6.5
Description :
If this property is True, then TopSolid will update after every call to the Automation
API, otherwise, it will be necessary to call the Synchronize method to do so.
Use
Boolean = IApplication.SynchronizeAuto
IApplication.SynchronizeAuto= Boolean
Remarks
92
Welcome
TileTwoDocuments
Property
Version : 6.7
Description :
Use
Parameters
93
Welcome
TranslatorsCount
Property
Version : 6.5
Description :
Use
Long = IApplication.TranslatorsCount
94
Welcome
Version
Property
Version : 6.5
Description :
Use
Long = IApplication.Version
Remarks
TopSolid version may be found interactively in the "About TopSolid..." box of the
Help menu, and is expressed with three numbers : " v<major>.<minor>.<build>".
For example, for TopSolid v6.4.243, the property value would be 604243.
It is important to check for TopSolid version at the start of the Automation program.
It is your responsibility to ensure that you are not going to access a resource that is
not available on the TopSolid release your are running.
95
Welcome
See also
Example
96
Welcome
Visible
Property
Version : 6.5
Description :
Use
Boolean = IApplication.Visible
IApplication.Visible = Boolean
Remarks
Setting this property to False, will make the application window invisible, even is
TopSolid was not started by Automation.
97
Welcome
_IApplicationEvents
Interface
Version : 6.5
Description :
98
Welcome
NotifyAboutToQuit
Event
Version : 6.5
Description :
Use
_IApplicationEvents.NotifyAboutToQuit(Cancel)
Parameters
99
Welcome
NotifyAfterDocumentSave
Event
Version : 6.6
Description :
Use
_IApplicationEvents.NotifyAfterDocumentSave(Document)
Parameters
100
Welcome
NotifyAfterDocumentUpdate
Event
Version : 6.6
Description :
This event notifies that the document has been updated (after loading).
Use
_IApplicationEvents.NotifyAfterDocumentUpdate(Document)
Parameters
101
Welcome
NotifyBeforeDocIndexModification
Event
Version : 6.7
Description :
This event notifies that the index of the document is going to be modified.
Use
_IApplicationEvents.NotifyBeforeDocIndexModification(Document, Cancel)
Parameters
102
Welcome
NotifyBeforeDocumentClose
Event
Version : 6.6
Description :
Use
_IApplicationEvents.NotifyBeforeDocumentClose(Document, Cancel)
Parameters
103
Welcome
NotifyBeforeDocumentLoad
Event
Version : 6.6
Description :
Use
Parameters
104
Welcome
NotifyBeforeDocumentModification
Event
Version : 6.6
Description :
Use
_IApplicationEvents.NotifyBeforeDocumentModification(Document, Cancel)
Parameters
105
Welcome
NotifyBeforeDocumentSave
Event
Version : 6.6
Description :
Use
_IApplicationEvents.NotifyBeforeDocumentSave(Document, Cancel)
Parameters
106
Welcome
NotifyBeforeDocumentUpdate
Event
Version : 6.6
Description :
This event notifies that the document is about to be updated (on document loading).
Use
_IApplicationEvents.NotifyBeforeDocumentUpdate(l)
107
Welcome
NotifyBrowseForInsertPart
Event
Version : 6.6
Description :
Use
_IApplicationEvents.NotifyBrowseForInsertPart(TypeNotify, Path)
Parameters
108
Welcome
NotifyCurrentDocumentHasChanged
Event
Version : 6.5
Description :
This event notifies that the current document has been changed.
Use
_IApplicationEvents.NotifyCurrentDocumentHasChanged()
109
Welcome
NotifyDocumentPasswordsAsked
Event
Version : 6.7
Description :
This event notifies that passwords for the loaded document are asked..
Use
_IApplicationEvents.NotifyPasswordsAsked(Document, WritePassword,
ReadPassword)
Parameters
110
Welcome
NotifyQuit
Event
Version : 6.5
Description :
Use
_IApplicationEvents.NotifyQuit()
111
Welcome
IAsks
Interface
Version : 6.5
Description :
This interface contains methods allowing to ask the user for some information using
TopSolid dialog bar.
Remarks
The Ask* methods display a question in the usual TopSolid way, and wait for an
answer from the user, which is returned once entered.
The message displayed in the dialog bar is defined with the Question property,
which must be set before calling the Ask* methods.
The Ask* methods usually return the type of answer given by the user (a
TopAskAnswer value).
If something went wrong (for example the user has interrupted the function by
pressing escape), the value topAskAnswerNothing is returned.
112
Welcome
Ask
Method
Version : 6.5
Description :
Use
TopAskAnswer = IAsks.Ask
Parameters
113
Welcome
AskEdge
Method
Version : 6.5
Description :
Use
TopAskAnswer = IAsks.AskEdge(Edge)
Parameters
114
Welcome
AskElement
Method
Version : 6.5
Description :
Use
TopAskAnswer = IAsks.AskElement(Element)
Parameters
115
Welcome
AskFace
Method
Version : 6.5
Description :
Use
TopAskAnswer = IAsks.AskFace(Face)
Parameters
116
Welcome
AskParameter
Method
Version : 6.5
Description :
Use
TopAskAnswer = IAsks.AskParameter(Parameter)
Parameters
117
Welcome
AskPoint
Method
Version : 6.5
Description :
Use
TopAskAnswer = IAsks.Askpoint(Point)
Parameters
118
Welcome
Button
Property
Version : 6.5
Description :
This property gives the number of the Question button clicked by the user, in the case
of an answer of type topAskAnswerButton.
Use
Long = IAsks.Button
Remarks
The first button from the left is number 1, and the following ones are obviously 2, 3,
...
119
Welcome
Question
Property
Version : 6.5
Description :
This property contains the message displayed in the dialog bar when a Ask method is
called.
Use
String = IAsks.Question
IAsks.Question = String
Remarks
The Question string may contain one or more buttons, defined by one or more
characters inside a pair of '{' '}' characters (ex: Question = "{STOP}{ALL EDGES}
Edge to copy:").
If one of these buttons are clicked by the user, the Ask method will return the value
topAskAnswerButton, and the number of the button clicked will be stored the Button
property.
120
Welcome
IBOM
Interface
Version : 6.6
Description :
This interface is implemented in every kind of BOM, and gives access to its features.
121
Welcome
ColumnsNumber
Property
Version : 6.6
Description :
This property gives the number of columns (BOM properties) in this BOM.
Use
Long = IBOM.ColumnsNumber
122
Welcome
ColumnsTitle
Property
Version : 6.6
Description :
This property allows to get the titles of each BOM property of the BOM (1 <= Index
<= ColumnsNumber).
Use
123
Welcome
SubLevels
Property
Version : 6.6
Description :
124
Welcome
IBOMLevel
Interface
Version : 6.6
Description :
This interface is implemented in every kind of BOM levels, and gives access to the
features that are common to all of them.
125
Welcome
Element
Property
Version : 6.6
Description :
This property gives access to the IElement interface of the BOMLevel object.
Remarks
126
Welcome
ElementCount
Property
Version : 6.6
Description :
Use
Long = IBOMLevel.ElementCount
Parameters
127
Welcome
ElementDesignation
Property
Version : 6.7
Description :
Use
String = IBOMLevel.ElementDesignation
Parameters
128
Welcome
ElementReference
Property
Version : 6.7
Description :
Use
String = IBOMLevel.ElementReference
Parameters
129
Welcome
GetShapes
Method
Version : 6.6
Description :
Use
Variant = IBOMLevel.GetShapes
Parameters
Remarks
With this method you can get the shapes of the BOMLEvel. The return value is an
array of IShape.
Example
130
Welcome
Dim i As Long
TopShapes = TopBomLevel.GetShapes
For i = 0 To ShapeCount
...
Next i
131
Welcome
Properties
Property
Version : 6.6
Description :
This property gives access to the BOM properties of the BOM level.
Use
IBOMProperties = IBOMLevel.Properties
132
Welcome
SubLevels
Property
Version : 6.6
Description :
This property gives access to the BOM levels of the BOM level.
Use
IBOMLevels = IBOMLevel.SubLevels
133
Welcome
IBOMLevels
Interface
Version : 6.6
Description :
This interface is a collection that allows to scan through the BOM levels of a BOM or
of a BOM level.
134
Welcome
Count
Property
Version : 6.6
Description :
Use
Integer = IBOMLevels.Count
135
Welcome
Item
Property
Version : 6.6
Description :
This property allows to get a BOM level of the collection (1 <= Index <= Count).
Use
136
Welcome
IBOMProperties
Interface
Version : 6.6
Description :
This interface is a collection that allows to scan through the BOM properties of a BOM
level.
137
Welcome
Count
Property
Version : 6.6
Description :
Use
Integer = IBOMProperties.Count
138
Welcome
Item
Property
Version : 6.6
Description :
This property allows to get a BOM property of the collection (1 <= Index <= Count).
Use
139
Welcome
IBOMProperty
Interface
Version : 6.6
Description :
This interface is implemented in every kind of BOM properties, and gives access to the
features that are common to all of them.
140
Welcome
Value
Property
Version : 6.6
Description :
Use
String = IBOMProperty.Value
141
Welcome
ValueType
Property
Version : 6.6
Description :
This property gives access to the type of the value of the BOM property.
Use
TopBomPropType = IBOMProperty.ValueType
142
Welcome
IComponent
Interface
Version : 6.5
Description :
This interface is implemented in every kind of components elements, and gives access
to the features that are common to all of them.
143
Welcome
Code
Property
Version : 6.6
Description :
Use
String = IComponent.Code
IComponent.Code= String
Remarks
144
Welcome
Element
Property
Version : 6.5
Description :
This property gives access to the IElement interface of the Component object.
Use
IElement = IComponent.Element
Remarks
145
Welcome
IsGeneric
Property
Version : 6.5
Description :
Use
Boolean = IComponent.IsGeneric
Remarks
146
Welcome
IsLocallyModified
Property
Version : 6.5
Description :
This property is True when the component is locally modified in the assembly.
Use
Boolean = IComponent.IsLocallyModified
Remarks
This happens when the geometry of one or several of its shapes/curves has been
altered with a modeling operation in the assembly (fillet, trim, ...).
147
Welcome
IsStandard
Property
Version : 6.5
Description :
Use
Boolean = IComponent.IsLocallyModified
148
Welcome
Move
Method
Version : 6.5
Description :
Use
Parameters
Remarks
The translation must not conflict with the component positioning constraints.
149
Welcome
Rotate
Method
Version : 6.5
Description :
Use
Parameters
Remarks
150
Welcome
The rotation must not conflict with the component positioning constraints.
151
Welcome
TemplateDocument
Property
Version : 6.5
Description :
Use
IDocument = IComponent.TemplateDocument
152
Welcome
Variant
Property
Version : 6.5
Description :
Use
String = IComponent.Variant
IComponent.Variant= String
Remarks
153
Welcome
IComponents interface
Interface
Version : 6.5
Description :
This interface is a collection that allows to scan through the components of the
document, and to create new components with the Add* methods.
154
Welcome
Add
Method
Version : 6.5
Description :
Use
Parameters
Remarks
155
Welcome
Example
Creating a component.
156
Welcome
AddStandard
Method
Version : 6.5
Description :
Use
Parameters
157
Welcome
Remarks
Example
158
Welcome
AddStandardWithPositioningByCoordinateSystems
Method
Version : 6.5
Description :
Use
IComponent =
IComponent.AddStandardWithPositioningByCoordinateSystems(Standard, Family,
Type, Variant, Version, Repres, Code, Origin, Destination)
Parameters
159
Welcome
Remarks
160
Welcome
AddWithPositioningByCoordinateSystems
Method
Version : 6.5
Description :
Use
Parameters
Remarks
161
Welcome
162
Welcome
Count
Method
Version : 6.5
Description :
Use
Integer = IComponents.Count
163
Welcome
Item
Method
Version : 6.5
Description :
This property allows to get a component of the collection (1 <= Index <= Count).
Use
164
Welcome
IContext
Interface
Version : 6.5
Description :
165
Welcome
Application
Method
Version : 6.5
Description :
Use
IApplication = IContext.Application
166
Welcome
Name
Property
Version : 6.5
Description :
Use
String = IContext.Name
Remarks
By convention, the name of the context is made of the name of the type library
where it has been defined, followed by the name of the context object, separated by a
dot.
For instance, the names of the standard ContextDesign and ContextDraft are :
"TopSolid.ContextDesign" and "TopSolid.ContextDraft".
167
Welcome
Version
Property
Version : 6.5
Description :
This property gives the version of the TopSolid based application managing the
context.
Use
Long= IContext.Version
Remarks
For the standard TopSolid contexts (ContextDesign and ContextDraft), this property
is equal to the Version property of the Application object (see: IApplication.Version).
168
Welcome
IContextDesign
Interface
Version : 6.5
Description :
This interface is implemented in the ContextDesign object, and gives access to the
specific features of this kind of context (the common features being accessed through
the IContext interface).
169
Welcome
CreateDocument
Method
Version : 6.5
Description :
Use
Parameters
Remarks
Example
170
Welcome
171
Welcome
IContextDraft
Interface
Version : 6.5
Description :
This interface is implemented in the ContextDraft object, and gives access to the
specific features of this kind of context (the common features being accessed through
the IContext interface).
172
Welcome
CreateDocument
Method
Version : 6.5
Description :
Use
Parameters
Remarks
173
Welcome
Example
174
Welcome
IContexts
Interface
Version : 6.5
Description :
Remarks
The context allows controlling the behavior of the management of this particular
type of document, it is also used to create new documents of this type with specific
arguments (unlike with the Add method of the Documents collection).
There are at least two contexts available : ContextDesign for managing design
documents, and ContextDraft for managing draft documents.
There may be more contexts available depending on the installed TopSolid based
applications.
Example
175
Welcome
Count
Method
Version : 6.5
Description :
Use
Integer = IContexts.Count
176
Welcome
Item
Method
Version : 6.5
Description :
This property allows to get a context of the collection (1 <= Index <= Count).
Use
177
Welcome
ICoordinateSystem
Interface
Version : 6.5
Description :
This interface is implemented in every kind of coordinate systems elements, and gives
access to the features that are common to all of them.
178
Welcome
Current
Property
Version : 6.5
Description :
This property is True when the coordinate system is current. Setting this property to
True makes the coordinate system current.
Use
Boolean = ICoordinateSystem.Current
ICoordinateSystem.Current = Boolean
Remarks
Setting this property to False is not allowed. If you wish to make the coordinate
system "not current", you need to make another coordinate system current is the same
document (there must always be one current coordinate system in the document).
179
Welcome
Element
Property
Version : 6.5
Description :
This property gives access to the IElement interface of the CoordinateSystem object.
Use
IElement = ICoordinateSystem.Element
Remarks
180
Welcome
MakeRefAxis
Method
Version : 6.5
Description :
This method makes a reference to one of the coordinate system axes : OX+, OY+,
OZ+, OX-, OY-, OZ-.
Use
IRefAxis = ICoordinateSystem.MakeRefAxis(Dir)
Parameters
181
Welcome
MakeRefDirection
Method
Version : 6.5
Description :
This method makes a reference to one of the coordinate system directions : X+, Y+,
Z+, X-, Y-, Z-.
Use
IRefDirection = ICoordinateSystem.MakeRefDirection(Dir)
Parameters
182
Welcome
ICoordinateSystems
Interface
Version : 6.5
Description :
This interface is a collection that allows to scan through the coordinate systems of the
document, and to create new coordinate systems with the Add* methods.
183
Welcome
AddBasic
Method
Version : 6.5
Description :
Use
ICoordinateSystem = ICoordinateSystems.AddBasic(Ox, Oy, Oz, Xx, Xy, Xz, Yx, Yy, Yz)
Parameters
Remarks
184
Welcome
The X and Y directions do not need to be exactly perpendicular (the Y direction will
be automatically modified to become perpendicular to the X direction), but they must
not be parallel.
185
Welcome
Count
Method
Version : 6.5
Description :
This property allows to get the number of coordinate systems in the collection.
Use
Integer = ICoordinateSystems.Count
186
Welcome
Item
Method
Version : 6.5
Description :
This property allows to get a coordinate system of the collection (1 <= Index <=
Count).
Use
187
Welcome
ICurve
Interface
Version : 6.5
Description :
This interface is implemented in every kind of curve elements, and gives access to the
features that are common to all of them.
188
Welcome
Element
Property
Version : 6.5
Description :
This property gives access to the IElement interface of the Curve object.
Use
IElement = ICurve.Element
Remarks
189
Welcome
MakeRefAxis
Method
Version : 6.5
Description :
Use
IRefAxis = ICurve.MakeRefAxis
Parameters
190
Welcome
MakeRefDirection
Method
Version : 6.5
Description :
Use
IRefDirection = ICurve.MakeRefDirection
Parameters
Remarks
191
Welcome
Segments
Property
Version : 6.5
Description :
This property gives access to the collection of segments contained in the curve.
Use
IRefSegments = ICurve.Segments
192
Welcome
ICurves
Interface
Version : 6.5
Description :
This interface is a collection that allows to scan through the curves of the document,
and to create new curves with the Add* methods.
193
Welcome
Add3PointsCircle
Method
Version : 6.6
Description :
Use
ICurve = ICurves.Add3PointsCircle(P1x, P1y, P1z, P2x, P2y, P2z, P3x, P3y, P3z, Type)
Parameters
194
Welcome
AddBasicBSplineByInterpolation
Method
Version : 6.5
Description :
Use
ICurve = ICurves.AddBasicBSplineByInterpolation(Pxs, Pys, Pzs, Sx, Sy, Sz, Tx, Ty, Tz)
Parameters
195
Welcome
Remarks
To create a B-spline curve with null curvature as an end condition, the tangent
vector must be set to (0,0,0).
Example
196
Welcome
AddBasicCircle
Method
Version : 6.5
Description :
Use
ICurve = ICurves.AddBasicCircle(Cx, Cy, Cz, Xx, Xy, Xz, Yx, Yy, Yz, Radius, Angle)
Parameters
197
Welcome
AddBasicComposit
Method
Version : 6.5
Description :
Use
Parameters
Remarks
The constituent curves must be connected : the termination point of one curve must
coincide with the starting point of the next one (within the modeling precision which is
0.01µm).
198
Welcome
Example
199
Welcome
AddBasicEllipse
Method
Version : 6.5
Description :
Use
ICurve = ICurves.AddBasicEllipse(Cx, Cy, Cz, Xx, Xy, Xz, Yx, Yy, Yz, XRadius, YRadius,
SAngle, TAngle)
Parameters
200
Welcome
201
Welcome
AddBasicLine
Method
Version : 6.5
Description :
Use
Parameters
Example
202
Welcome
AddBasicPeriodicBSplineByInterpolation
Method
Version : 6.5
Description :
Use
Parameters
Remarks
203
Welcome
Count
Method
Version : 6.5
Description :
Use
Integer = ICurves.Count
204
Welcome
Item
Method
Version : 6.5
Description :
This property allows to get a curve of the collection (1 <= Index <= Count).
Use
205
Welcome
IDimension
Interface
Version : 6.5
Description :
This interface is implemented in every kind of dimensions, and gives access to the
features that are common to all of them.
206
Welcome
Element
Property
Version : 6.5
Description :
This property gives access to the IElement interface of the Dimension object.
Use
IElement = IDimension.Element
Remarks
207
Welcome
HighSuffix
Property
Version : 6.6
Description :
Use
String = IDimension.HighSuffix
208
Welcome
LowSuffix
Property
Version : 6.6
Description :
Use
String = IDimension.LowSuffix
209
Welcome
Prefix
Property
Version : 6.6
Description :
Use
String = IDimension.Prefix
210
Welcome
Suffix
Property
Version : 6.6
Description :
Use
String = IDimension.Suffix
IDimension.Suffix = String
211
Welcome
Text
Property
Version : 6.6
Description :
Use
String = IDimension.Text
IDimension.Text = String
212
Welcome
IDimensions
Interface
Version : 6.6
Description :
This interface is a collection that allows to scan through the dimensions of the
document.
213
Welcome
Count
Property
Version : 6.6
Description :
Use
Integer = IDimensions.Count
214
Welcome
Item
Property
Version : 6.6
Description :
This property allows to get a dimension of the collection (1 <= Index <= Count).
Use
215
Welcome
IDocument
Interface
Version : 6.5
Description :
Using this interface allows performing some general tasks (like printing or adding
comments...) without bothering about the exact type of the actual document being
handled.
216
Welcome
Address1
Property
Version : 6.5
Description :
This property allows to get or set the "Address 1" field of the document general
information (accessible to the TopSolid user through the "File | Properties" command).
Use
String = IDocument.Address1
IDocument.Address1 = String
217
Welcome
Address2
Property
Version : 6.5
Description :
This property allows to get or set the "Address 2" field of the document general
information (accessible to the TopSolid user through the "File | Properties" command).
Use
String = IDocument.Address2
IDocument.Address2 = String
218
Welcome
Application
Property
Version : 6.5
Description :
Use
IApplication = IDocument.Application
219
Welcome
Author
Property
Version : 6.5
Description :
This property allows to get or set the "Author" field of the document general
information (accessible to the TopSolid user through the "File | Properties" command).
Use
String = IDocument.Author
IDocument.Author = String
220
Welcome
BreakAllGroups
Method
Version : 6.6
Description :
This method breaks all groups in document. Elements inside groups are kept.
Use
IDocument.BreakAllGroups()
221
Welcome
Close
Method
Version : 6.5
Description :
Use
IDocument.Close(Save, Ask)
Parameters
Remarks
It is good practice to set the document pointer to Nothing just after calling this
method, as the document does not exist anymore, and trying to access it through the
pointer will then cause a crash :
222
Welcome
...
Doc.Close
...
223
Welcome
Company
Method
Version : 6.5
Description :
This property allows to get or set the "Company name" field of the document general
information (accessible to the TopSolid user through the "File | Properties" command).
Use
String = IDocument.Company
IDocument.Company = String
224
Welcome
CreateRevisionIndex
Method
Version : 6.6
Description :
Use
Parameters
225
Welcome
Current
Property
Version : 6.5
Description :
This property is True when the document is current. Setting this property to True will
make the document current.
Use
Boolean = IDocument.Current
IDocument.Current = Boolean
Remarks
226
Welcome
CurrentLevel
Property
Version : 6.6
Description :
This property allows to get or set the current level of the document.
Use
Long = IDocument.CurrentLevel
IDocument.CurrentLevel = Long
227
Welcome
Elements
Property
Version : 6.5
Description :
This property gives access to the collection of elements contained in the document.
Use
IElements = IDocument.Elements
228
Welcome
Export
Method
Version : 6.7
Description :
This method exports the document with the specified interface provider.
Use
Parameters
229
Welcome
FactorySuffix
Property
Version : 6.7
Description :
Use
String = IDocument.FactorySuffix
230
Welcome
FullName
Property
Version : 6.5
Description :
This property allows to get the full name (including the path) of the document.
Use
String = IDocument.Name
231
Welcome
GetBOM
Method
Version : 6.6
Description :
Use
Parameters
DocumentDesign.Assembly for
DocumentDesign.
IN IElement Element
View for DocumentDraft.
IN String Path Date of the creation.
Boolean
IN True to group same elements.
GroupElements
RET IBOM BOM of the document.
232
Welcome
GetExternalReferencedDocuments
Method
Version : 6.6
Description :
Use
IDocument.GetExternalReferencedDocuments(Paths, Types)
Parameters
Example
...
233
Welcome
...
234
Welcome
GetLevelProperties
Method
Version : 6.6
Description :
Use
Parameters
Remarks
235
Welcome
Example
236
Welcome
GetLevelPropertiesByName
Method
Version : 6.6
Description :
Use
Parameters
Remarks
With this method you can get the properties of a level or a group. The level must be
named with the SetLevelProperty method. The group must be named with the
SetLevelsProperty method.
237
Welcome
LevelName returns the name of the level if it's a level (it's the same name as Level).
GroupName returns the name of the group if it's a group or the name of the group
of the level (if the level is in a group).
Example
238
Welcome
GetProperty
Method
Version : 6.6
Description :
Use
String = IDocument.GetProperty(property)
Parameters
Remarks
With this method you can access to user information variables (defined in your
top.dgi file).
Example
239
Welcome
value = Doc.GetProperty("$Author")
240
Welcome
Identifier
Property
Version : 6.7
Description :
Use
Integer = IDocument.Identifier
241
Welcome
InvalidElementsSet
Method
Version : 6.6
Description :
Use
ISet = IDocument.InvalidElementsSet
242
Welcome
LastRevisionIndex
Method
Version : 6.6
Description :
This property gives access to the last revision index of a document. A revision index
can be created with CreateRevisionIndex.
Use
String = IDocument.LastRevisionIndex
243
Welcome
Modified
Method
Version : 6.6
Description :
Use
Boolean = IDocument.Modified
244
Welcome
MoveExternalReferences
Method
Version : 6.6
Description :
Use
IDocument.MoveExternalReferences(OldPaths, NewPaths)
Parameters
Example
...
245
Welcome
ReDim oldpath(1)
ReDim newpath(1)
oldpath(0) = "D:\Projets\Classeur1.xls"
newpath(0) = "D:\Projets\classeur2.xls"
...
246
Welcome
Name
Property
Version : 6.5
Description :
Use
String = IDocument.Name
247
Welcome
Number
Property
Version : 6.5
Description :
This property allows to get or set the "Document number" field of the document
general information (accessible to the TopSolid user through the "File | Properties"
command).
Use
String = IDocument.Number
IDocument.Number = String
248
Welcome
Path
Property
Version : 6.5
Description :
This property allows to get the path for the document (i.e. the full name of the folder
containing the document).
Use
String = IDocument.Path
249
Welcome
PrintOut
Method
Version : 6.5
Description :
Use
IDocument.PrintOut()
Remarks
In the case of a draft document with multiple drawings, all drawings are printed
separately. If you want to only print one of them, you should use the
IDrawing.PrintOut method.
Example
250
Welcome
ProgramUnitAngle
Property
Version : 6.5
Description :
This property allows to get and set the angle unit used by the API for objects
belonging to the document.
Use
String = IDocument.ProgramUnitAngle
IDocument.ProgramUnitAngle = String
Remarks
The angle unit is defined by its symbol : "°" for degrees, "rad" for radians, ...
The list of all supported angle units is displayed in the "Angle" combo box of the
"Units" tab of TopSolid "File | Properties" panel.
When the document is first accessed, the document program angle unit is set equal
to the application program unit.
See also
251
Welcome
Program units
IApplication.ProgramUnitAngle.
252
Welcome
ProgramUnitLength
Property
Version : 6.5
Description :
This property allows to get and set the length unit used by the API for objects
belonging to the document.
Use
String = IDocument.ProgramUnitLength
IDocument.ProgramUnitLength = String
Remarks
The length unit is defined by its symbol : "mm" for millimeters, "m" for meters, "in"
for inches, ...
The list of all supported length units is displayed in the "Length" combo box of the
"Units" tab of TopSolid "File | Properties" panel.
When the document is first accessed, the document program length unit is set equal
to the application program unit.
253
Welcome
See also
Program units
IApplication.ProgramUnitLength.
254
Welcome
ReadOnly
Property
Version : 6.5
Description :
Use
Boolean = IDocument.ReadOnly
255
Welcome
Regenerate
Property
Version : 6.6
Description :
Use
IDocument.Regenerate()
256
Welcome
Save
Method
Version : 6.5
Description :
Use
IDocument.Save(Ask)
Parameters
Remarks
If the user refuses to save the modified referenced files, the document is not saved.
It is possible to check that the document has been saved with the Saved property.
257
Welcome
SaveAs
Method
Version : 6.5
Description :
Use
IDocument.SaveAs(Name, Ask)
Parameters
Remarks
As the TopSolid "File | Save as" command, this method allows to both save the
document into a different file, and export the document into an external format file
(the available translators will depend on your TopSolid configuration : IGES, STEP, ...)
depending on the file name extension.
If the user refuses to save the modified referenced files, the document is not saved.
258
Welcome
It is possible to check that the document has been saved with the Saved property.
259
Welcome
Saved
Method
Version : 6.5
Description :
This property is True when the document file on the disk is up-to-date with the "in
memory" document (i.e. when there is no '*' displayed in the document window title
bar).
Use
Boolean = IDocument.Saved
Remarks
This property is also True if the document has never been saved, but has not
changed since it was created.
260
Welcome
SearchElementByName
Method
Version : 6.6
Description :
Use
IElement = IDocument.SearchElementByName(name)
Parameters
Remarks
Example
261
Welcome
element = Doc.SearchElementByName("cube_orange")
Else
End If
262
Welcome
SetLevelProperty
Method
Version : 6.6
Description :
Use
Parameters
TopLevelProperty
IN Property type.
PropertyType
IN Long Level Level index.
IN String Name Name.
Remarks
The TopLevelProperty TopGroup can't be used with this method (see also
SetLevelsProperty method and SetLevelsPropertyByName method).
The TopLevelProperty TopSplit can't be used with this method (see also
SetLevelPropertyByName method when there's only a group to split of
263
Welcome
Example
Doc.SetLevelProperty topDisable, 12
264
Welcome
SetLevelPropertyByName
Method
Version : 6.6
Description :
Use
Parameters
TopLevelProperty
IN Property type.
PropertyType
IN String Level Level or group name.
IN String Name Property name.
Remarks
The TopLevelProperty TopGroup can't be used with this method (see also
SetLevelsProperty method and SetLevelsPropertyByName method).
265
Welcome
Example
266
Welcome
SetLevelsProperty
Method
Version : 6.6
Description :
Use
Parameters
TopLevelProperty
IN Property type.
PropertyType
IN Long Levels (array) List of level indexes.
IN String Name Property name.
Remarks
The name can be used to name a group when it's a list of level indexes.
The name can be used to name a level when there's only one level in the list. (See also
SetLevelProperty method).
267
Welcome
Example
linexes(0) = 10
lindexes(1) = 11
lindexes(2) = 12
lgroup(0) = 20
lgroup(1) = 21
lgroup(2) = 22
lgroup(3) = 23
268
Welcome
SetLevelsPropertyByName
Method
Version : 6.6
Description :
Use
Parameters
TopLevelProperty
IN Property type.
PropertyType
IN Long Levels (array) List of level names.
IN String Name Property name.
Remarks
The name can be used to name a group when it's a list of level.
269
Welcome
The name can be used to name a level when there's only one level in the list. (See also
SetLevelProperty method).
Example
lnames(0) = "level1"
lnames(1) = "level2"
lnames(2) = "level3"
270
Welcome
SetPasswords
Method
Version : 6.7
Description :
This method sets the write and read password of the document.
Use
IDocument.SetPasswords(WritePassword, ReadPassword)
Parameters
Remarks
To enter the password(s) when opening a document, you have to use the
NotifyDocumentPasswordsAsked event.
271
Welcome
SetProperty
Method
Version : 6.6
Description :
Use
IDocument.SetProperty(propertyname, value)
Parameters
Remarks
With this method you can access to user information variables (defined in your
top.dgi file).
Example
272
Welcome
273
Welcome
Texts
Property
Version : 6.6
Description :
This property gives access to the methods allowing to create textsin the document.
Use
ITexts = IDocument.Texts
274
Welcome
Title1
Property
Version : 6.5
Description :
This property allows to get or set the "Title 1" field of the document general
information (accessible to the TopSolid user through the "File | Properties" command).
Use
String = IDocument.Title1
IDocument.Title1 = String
275
Welcome
Title2
Property
Version : 6.5
Description :
This property allows to get or set the "Title 2" field of the document general
information (accessible to the TopSolid user through the "File | Properties" command).
Use
String = IDocument.Title2
IDocument.Title2 = String
276
Welcome
Undisplay
Method
Version : 6.7
Description :
Use
IDocument.Undisplay()
277
Welcome
Version
Property
Version : 6.5
Description :
This property gives the version of TopSolid used when last saving the document.
Use
Long = IDocument.Version
See also
IApplication.Version.
278
Welcome
Visible
Property
Version : 6.5
Description :
This property is True when the document window is visible. Setting this property to
True/False will make the document window visible/invisible.
Use
Boolean = IDocument.Visible
IDocument.Visible = Boolean
279
Welcome
IDocumentDesign
Interface
Version : 6.5
Description :
This interface is implemented in the DocumentDesign object, and gives access to the
specific features of this kind of document (the common features being accessed
through the IDocument interface).
280
Welcome
AbsoluteCoordinateSystem
Property
Version : 6.5
Description :
This property gives access to the absolute coordinate system of the document.
Use
ICoordinateSystem = IDocumentDesign.AbsoluteCoordinateSystem
281
Welcome
Assembly
Property
Version : 6.5
Description :
Use
ISet = IDocumentDesign.Assembly
Remarks
The assembly is a set that contains all the elements that actually make it.
282
Welcome
Components
Property
Version : 6.5
Description :
This property gives access to the methods allowing to create components in the
document.
Use
IComponents = IDocumentDesign.Components
283
Welcome
CoordinateSystems
Property
Version : 6.5
Description :
This property gives access to the methods allowing to create coordinate systems in the
document.
Use
ICoordinateSystems = IDocumentDesign.CoordinateSystems
284
Welcome
CurrentCoordinateSystem
Property
Version : 6.5
Description :
This property gives access to the current coordinate system of the document. To make
a coordinate system current, set the Current property of the coordinate system to
True.
Use
ICoordinateSystem = IDocumentDesign.CurrentCoordinateSystem
285
Welcome
Curves
Property
Version : 6.5
Description :
This property gives access to the methods allowing to create curves in the document.
Use
ICurves = IDocumentDesign.Curves
286
Welcome
Document
Property
Version : 6.5
Description :
This property gives access to the IDocument interface of the DocumentDesign object.
Use
IDocument = IDocumentDesign.Document
Remarks
287
Welcome
Parameters
Property
Version : 6.5
Description :
This property gives access to the methods allowing to create parameters in the
document.
Use
IParameters = IDocumentDesign.Parameters
288
Welcome
Points
Property
Version : 6.5
Description :
This property gives access to the methods allowing to create points in the document.
Use
IPoints = IDocumentDesign.Points
289
Welcome
PurgeShapes
Method
Version : 6.6
Description :
Use
IDocumentDesign.PurgeShapes()
290
Welcome
Shapes
Method
Version : 6.6
Description :
This property gives access to the methods allowing to create shapes in the document.
Use
IShapes = IDocumentDesign.Shapes
291
Welcome
_IDocumentDesignEvents
Interface
Version : 6.5
Description :
292
Welcome
NotifyDelete
Event
Version : 6.5
Description :
Use
_IDocumentDesignEvents.NotifyDelete()
293
Welcome
IDocumentDraft
Interface
Version : 6.5
Description :
This interface is implemented in the DocumentDraft object, and gives access to the
specific features of this kind of document (the common features being accessed
through the IDocument interface).
294
Welcome
Drawings
Method
Version : 6.5
Description :
This property gives access to the methods allowing to get the drawings of the
document.
Use
IDrawings = IDocumentDraft.Drawings
295
Welcome
Dimensions
Method
Version : 6.6
Description :
This property gives access to the collection of dimensions contained in the draft
document.
Use
IDimensions = IDocumentDraft.Dimensions
296
Welcome
_IDocumentDraftEvents
Interface
Version : 6.5
Description :
297
Welcome
NotifyDelete
Event
Version : 6.5
Description :
Use
_IDocumentDdraftEvents.NotifyDelete()
298
Welcome
IDocuments
Interface
Version : 6.5
Description :
This interface gives access to the collection of the documents loaded in memory.
In general, this means all the displayed documents (Visible property equal to True)
plus all the documents directly or indirectly referenced by them.
299
Welcome
Add
Method
Version : 6.5
Description :
This method creates a new document from scratch or by using a given template.
Use
IDocument = IDocuments.Add(Template)
Parameters
Remarks
To create a new document from scratch, just give the extension of the type of file
you want to create (for example, to create a new design document, use Template =
"top", to create a new draft document use Template = "dft", ...).
To use a given template, just give the name of the template file (including
extension) as Template parameter (for example Template = "MyTemplate.top").
300
Welcome
Creating a new document from scratch is equivalent to using the "File | New" menu
function of TopSolid, in the mode "Without template", and accepting the default
options in the final dialog box.
When giving the name of a template file, the file is searched sequentially in the
following directories : $TOPCONFIG\template, $TOPGROUP\template,
$TOPHOME\local\$TOPLANG\template (if the file is not found, the method fails).
Example
301
Welcome
Close
Method
Version : 6.5
Description :
Use
IDocuments.Close(Save, Ask)
Parameters
302
Welcome
Count
Property
Version : 6.5
Description :
Use
Integer = IDocuments.Count
303
Welcome
Import
Method
Version : 6.7
Description :
This method imports an existing document by specifying the interface provider to use.
Use
Parameters
304
Welcome
Item
Property
Version : 6.5
Description :
This property allows to get a document the collection (1 <= Index <= Count).
Use
305
Welcome
Load
Method
Version : 6.7
Description :
Use
Parameters
306
Welcome
Open
Method
Version : 6.5
Description :
Use
Parameters
Remarks
As the TopSolid "File | Open" command, this method allows to both open a TopSolid
application document (Design, Draft, Mold, CAM, ...), and import an external format
file (the available translators will depend on your TopSolid configuration : IGES, STEP,
...) into a new document.
307
Welcome
In the second case, several documents may be produced (for instance, some IGES
files contain a 3D model and a draft), which are returned in the "Documents" variant
array.
When importing an external format file, it is possible to choose the type of TopSolid
document produced by giving the extension of the document in the "Type" parameter
(for instance, to import an XT file into a new CAM document, use Type = "cam").
Example
pening a document
308
Welcome
IDrawing
Interface
Version : 6.5
Description :
This interface is implemented in every kind of drawing elements, and gives access to
the features that are common to all of them.
309
Welcome
Element
Property
Version : 6.5
Description :
This property gives access to the IElement interface of the Drawing object.
Use
IElement = IDrawing.Element
Remarks
310
Welcome
PaperFormat
Property
Description :
This property allows to get and set the drawing paper format.
Use
TopPaperFormat = IDrawing.PaperFormat
IDrawing.PaperFormat(PaperFormat)
311
Welcome
PrintOut
Method
Version : 6.5
Description :
Use
IDrawing.PrintOut()
Remarks
312
Welcome
ScaleFactor
Property
Version : 6.7
Description :
Use
Double = IDrawing.ScaleFactor
IDrawing.ScaleFactor(Scale)
313
Welcome
IDrawings
Interface
Version : 6.5
Description :
This interface is a collection that allows to scan through the drawings of the
document.
314
Welcome
Count
Property
Version : 6.5
Description :
Use
Integer = IDrawings.Count
315
Welcome
Item
Property
Version : 6.5
Description :
This property allows to get a drawing of the collection (1 <= Index <= Count).
Use
316
Welcome
IElement
Interface
Version : 6.5
Description :
Using this interface allows performing some general tasks (like changing layer,
scanning user properties, ...) without bothering about the exact type of the actual
element being handled.
317
Welcome
Analyse
Method
Version : 6.6
Description :
This method allows to get some geometrical properties (area, volume, mass).
Use
Variant = IElement.Analyse(Analysis)
Parameters
Example
value = Doc.Elements.Item(i).Analyse(topArea)
318
Welcome
Application
Property
Version : 6.5
Description :
Use
IApplication = IElement.Application
319
Welcome
Basify
Method
Version : 6.6
Description :
Use
IElement.Basify()
320
Welcome
Blanked
Property
Version : 6.5
Description :
When this property is True, the element is blanked out, and therefore not visible.
When this property is False, the element may be visible, depending on other factors.
Use
Boolean = IElement.Blanked
IElement.Blanked= Boolean
321
Welcome
BreakAssociativity
Method
Version : 6.5
Description :
Use
IElement.BreakAssociativity(DeleteTools, ShowTools)
Parameters
322
Welcome
Color
Property
Version : 6.5
Description :
Use
TopColor = IElement.Color
IElement.Color = TopColor
See also
GetColorRGB method.
323
Welcome
Delete
Method
Version : 6.5
Description :
Use
IElement.Delete
Remarks
It is good practice to set the element pointer to Nothing just after calling this
method, as the element does not exist anymore, and trying to access it through the
pointer will then cause a crash :
...
Elt.Delete
...
324
Welcome
Designation
Property
Version : 6.5
Description :
Use
String = IElement.Designation
IElement.Designation = String
Remarks
- A specific method when available (for instance for the standard components).
325
Welcome
Document
Property
Version : 6.5
Description :
Use
IDocument = IElement.Document
326
Welcome
GetColorRGB
Method
Version : 6.5
Description :
Use
Parameters
Remarks
If the element does not support the color attribute, (0,0,0) is returned.
See also
327
Welcome
Color property.
328
Welcome
GetConstituents
Method
Version : 6.7
Description :
Use
Variant = IElement.GetConstituents()
Parameters
329
Welcome
GetMatter
Method
Version : 6.6
Description :
Use
Parameters
330
Welcome
Double
InjectionPressureMin
Double
OUT Maximum injection pressure, in kg/cm²
InjectionPressureMax
OUT Double Conductivity Conductivity, in W/m.°C.
OUT Double Thermicinertia Thermic inertia, in J/m³.°C.
331
Welcome
GetTextProperty
Method
Version : 6.6
Description :
This method gets the value of a property containing a single text field.
Use
String = IElement.GetTextProperty(Name)
Parameters
Remarks
If the element does not have the wanted property, the method returns an empty
string.
332
Welcome
Identifier
Property
Version : 6.6
Description :
Use
Long = IElement.Identifier
333
Welcome
Invalid
Property
Version : 6.6
Description :
Use
Boolean = IElement.Invalid
334
Welcome
Layer
Property
Version : 6.6
Description :
Use
Integer = IElement.Layer
IElement.Layer = Integer
Remarks
If the element does not support the layer attribute, the property returns -2.
335
Welcome
Level
Property
Version : 6.6
Description :
Use
Long = IElement.Level
IElement.Level = Long
336
Welcome
Name
Property
Version : 6.5
Description :
Use
String = IElement.Name
IElement.Name = String
Use
337
Welcome
NameOrIdentifier
Property
Version : 6.5
Description :
Use
String = IElement.NameOrIdentifier
Use
Otherwise, a name is made by concatenating '@' and the identifier of the element
(ex: "@1234").
338
Welcome
Reference
Property
Version : 6.5
Description :
This property allows to get or set the reference number of the element.
Use
String = IElement.Reference
IElement.Reference = String
Remarks
To remove the reference number of an element, just set it equal to an empty string.
If the element has no reference number, this property returns an empty string.
339
Welcome
RemoveProperty
Method
Version : 6.6
Description :
Use
IElement.RemoveProperty(Name)
Parameters
Remarks
340
Welcome
SaveInFile
Method
Version : 6.6
Description :
Use
Parameters
341
Welcome
SetTextProperty
Method
Version : 6.5
Description :
This method allows to set the value of a property containing a single text field.
Use
IElement.SetTextProperty(Name, Value)
Parameters
Remarks
If the element does not already have the property, a new property is added to the
element.
342
Welcome
SetTexture
Method
Version : 6.7
Description :
Use
IElement.SetTexture(RefElement)
Parameters
343
Welcome
Supplier
Property
Version : 6.5
Description :
Use
String = IElement.Supplier
IElement.Supplier = String
Remarks
344
Welcome
Visible
Property
Version : 6.5
Description :
Use
Boolean = IElement.Visible
Remarks
345
Welcome
IElements
Interface
Version : 6.5
Description :
This interface gives access to the collection of the elements contained by a document.
346
Welcome
Count
Property
Version : 6.5
Description :
Use
Integer = IElements.Count
347
Welcome
Item
Property
Version : 6.5
Description :
This property allows to get an element of the collection (1 <= Index <= Count).
Use
348
Welcome
NameIsUsed
Method
Version : 6.5
Description :
This method finds out if a given name is already used by an element of the collection.
Use
Boolean = IElements.NameIsUsed(Name)
Parameters
349
Welcome
IExtension
Interface
Version : 6.5
Description :
This interface is implemented in every kind of extension objects, and gives access to
the features that are common to all of them.
350
Welcome
Application
Property
Version : 6.5
Description :
Use
IApplication = IExtension.Application
351
Welcome
Name
Property
Version : 6.5
Description :
Use
String = IExtension.Name
Remarks
By convention, the name of the extension is made of the name of the type library
where it has been defined, followed by the name of the extension object, separated by
a dot.
352
Welcome
Version
Property
Version : 6.5
Description :
Use
Long= IExtension.Version
353
Welcome
IContexts
Interface
Version : 6.5
Description :
These extensions are able to expose some COM Automation interfaces to enrich
TopSolid API, in which case they will be accessible in this collection.
354
Welcome
Count
Property
Version : 6.5
Description :
Use
Integer = IExtensions.Count
355
Welcome
Item
Property
Version : 6.5
Description :
This property allows to get an extension of the collection (1 <= Index <= Count).
Use
356
Welcome
IParameter
Interface
Version : 6.5
Description :
This interface is implemented in every kind of parameter elements, and gives access
to the features that are common to all of them.
357
Welcome
GetConvertedTolerance
Method
Version : 6.6
Description :
This method gets the minimum and maximum tolerance values of a parameter in the
unit you want (Symbol).
Use
Parameters
Remarks
If the symbol is not in the same type unit as the parameter, the method returns an
error.
358
Welcome
GetConvertedValue
Method
Version : 6.6
Description :
This method gets the value of a parameter in the unit you want (Symbol).
Use
Double = IParameter.GetConvertedValue(Symbol)
Parameters
Remarks
If the symbol is not in the same type unit as the parameter, the method returns an
error.
Example
359
Welcome
value = TopParam.GetConvertedValue("cm")
360
Welcome
Element
Property
Version : 6.5
Description :
This property gives access to the IElement interface of the Parameter object.
Use
IElement = IParameter.Element
Remarks
361
Welcome
Modifiable
Property
Version : 6.6
Description :
This property is True when the parameter is modifiable. Only basic parameters can be
modified.
Use
Boolean = IParameter.Modifiable
362
Welcome
NominalValue
Property
Version : 6.5
Description :
This property allows to get and to set the nominal value of the parameter.
Use
Double = IParameter.NominalValue
IParameter.NominalValue = Double
Remarks
For length and angle type parameter, the value is not expressed in the parameter
units, but in program units.
For the other types, the value is expressed in the parameter units.
You can get the unit of a parameter with the method GetUnitSymbol.
363
Welcome
SetConvertedTolerance
Method
Version : 6.6
Description :
This method sets the minimum and maximum tolerance values of a parameter in the
unit you want (Symbol).
Use
Parameters
Remarks
If the symbol is not in the same type unit as the parameter, the method returns an
error.
364
Welcome
SetConvertedValue
Method
Version : 6.6
Description :
This method sets the value of the parameter in the unit you want (Symbol).
Use
IParameter.SetConvertedValue(Value, Symbol)
Parameters
Remarks
If the symbol is not in the same type unit as the parameter, the method returns an
error.
365
Welcome
Example
TopParam.SetConvertedValue(value, "cm")
366
Welcome
UnitSymbol
Property
Version : 6.5
Description :
This property allows to get the symbol of the unit of the parameter.
Use
String = IParameter.UnitType
Remarks
The list of all units is displayed in the "Units" tab of TopSolid "File | Properties"
panel.
367
Welcome
UnitType
Property
Version : 6.6
Description :
Use
TopParamUnitType = IParameter.UnitType
368
Welcome
Value
Property
Version : 6.5
Description :
Use
Double = IParameter.Value
Remarks
The value is not expressed in the parameter units, but in program units.
369
Welcome
IParameters
Interface
Version : 6.5
Description :
This interface is a collection that allows to scan through the parameters of the
document, and to create new parameters with the Add* methods.
370
Welcome
AddBasic
Method
Version : 6.5
Description :
Use
Parameters
Example
371
Welcome
Count
Property
Version : 6.5
Description :
Use
Integer = IParameters.Count
372
Welcome
Item
Property
Version : 6.5
Description :
This property allows to get a parameter of the collection (1 <= Index <= Count).
Use
373
Welcome
IPoint
Interface
Version : 6.5
Description :
This interface is implemented in every kind of point elements, and gives access to the
features that are common to all of them.
374
Welcome
Element
Property
Version : 6.5
Description :
This property gives access to the IElement interface of the Point object.
Use
IElement = IPoint.Element
Remarks
375
Welcome
GetCoordinates
Method
Version : 6.5
Description :
Use
IPoint.GetCoordinates(X, Y, Z)
Parameters
376
Welcome
SetCoordinates
Method
Version : 6.5
Description :
Use
IPoint.SetCoordinates(X, Y, Z)
Parameters
IN Double X X coordinate.
IN Double Y Y coordinate.
IN Double Z Z coordinate.
377
Welcome
Property
Version : 6.5
Description :
This property allows to get and to set the X coordinate of the point.
Use
Double = IPoint.X
IPoint.X = Double
Remarks
378
Welcome
Property
Version : 6.5
Description :
This property allows to get and to set the Y coordinate of the point.
Use
Double = IPoint.Y
IPoint.Y = Double
Remarks
379
Welcome
Property
Version : 6.5
Description :
This property allows to get and to set the Z coordinate of the point.
Use
Double = IPoint.Z
IPoint.Z = Double
Remarks
380
Welcome
IPoints
Interface
Version : 6.5
Description :
This interface is a collection that allows to scan through the points of the document,
and to create new points with the Add* methods.
381
Welcome
AddBarycenter
Method
Version : 6.5
Description :
Use
Parameters
382
Welcome
AddBasic
Method
Version : 6.5
Description :
Use
IPoint = IPoints.AddBasic(X, Y, Z)
Parameters
IN Double X X coordinate.
IN Double Y Y coordinate.
IN Double Z Z coordinate.
RET IPoint Created point.
383
Welcome
Count
Property
Version : 6.5
Description :
Use
Integer = IPoints.Count
384
Welcome
Item
Property
Version : 6.5
Description :
This property allows to get a point of the collection (1 <= Index <= Count).
Use
385
Welcome
IRef
Interface
Version : 6.5
Description :
386
Welcome
Element
Property
Version : 6.5
Description :
Use
IElement = IRef.Element
387
Welcome
IRefAxis
Interface
Version : 6.5
Description :
This interface is implemented in the RefAxis object, and gives access to the specific
features of this kind of reference (the common features being accessed through the
IRef interface).
388
Welcome
GetAxis
Method
Version : 6.5
Description :
This method gets the coordinates of the origin point and the direction of the
referenced axis.
Use
Parameters
Remarks
389
Welcome
GetDirection
Method
Version : 6.5
Description :
This method gets the coordinates of the direction vector of the referenced axis.
Use
Parameters
Remarks
390
Welcome
GetOrigin
Method
Version : 6.5
Description :
This method gets the coordinates of the origin point of the referenced axis.
Use
Parameters
391
Welcome
ReverseDirection
Method
Version : 6.5
Description :
Use
IRefAxis.ReverseDirection
392
Welcome
IRefDirection
Interface
Version : 6.5
Description :
This interface is implemented in the RefDirection object, and gives access to the
specific features of this kind of reference (the common features being accessed
through the IRef interface).
393
Welcome
GetDirection
Method
Version : 6.5
Description :
Use
Parameters
Remarks
394
Welcome
ReverseDirection
Method
Version : 6.5
Description :
Use
IRefDirection.ReverseDirection
395
Welcome
IRefEdge
Interface
Version : 6.5
Description :
This interface is implemented in the RefEdge object, and gives access to the specific
features of this kind of reference (the common features being accessed through the
IRef interface).
396
Welcome
CurveType
Property
Version : 6.5
Description :
This property allows to get the type of the geometric curve attached to the referenced
edge.
Use
TopCurveType = IRefEdge.CurveType
397
Welcome
Identifier
Property
Version : 6.5
Description :
Use
Long = IRefEdge.Identifier
Remarks
398
Welcome
IRefEdges
Interface
Version : 6.5
Description :
This interface gives access to the collection of the edges contained in a shape.
399
Welcome
Count
Property
Version : 6.5
Description :
Use
Integer = IRefEdges.Count
400
Welcome
Item
Property
Version : 6.5
Description :
This property allows to get an edge of the collection (1 <= Index <= Count).
Use
401
Welcome
IRefFace
Interface
Version : 6.5
Description :
This interface is implemented in the RefFace object, and gives access to the specific
features of this kind of reference (the common features being accessed through the
IRef interface).
402
Welcome
Identifier
Property
Version : 6.5
Description :
Use
Long = IRefFace.Identifier
Remarks
403
Welcome
SurfaceType
Property
Version : 6.5
Description :
This property allows to get the type of the geometric surface attached to the
referenced face.
Use
TopSurfaceType = IRefFace.SurfaceType
404
Welcome
IRefFaces
Interface
Version : 6.5
Description :
This interface gives access to the collection of the faces contained in a shape.
405
Welcome
Count
Property
Version : 6.5
Description :
Use
Integer = IRefFaces.Count
406
Welcome
Item
Property
Version : 6.5
Description :
This property allows to get a face of the collection (1 <= Index <= Count).
Use
407
Welcome
IRefPlane
Interface
Version : 6.5
Description :
This interface is implemented in the RefPlane object, and gives access to the specific
features of this kind of reference (the common features being accessed through the
IRef interface).
408
Welcome
GetNormal
Method
Version : 6.5
Description :
This method gets the coordinates of the normal direction vector of the referenced
plane.
Use
Parameters
Remarks
409
Welcome
GetOrigin
Method
Version : 6.5
Description :
This method gets the coordinates of the origin point of the referenced plane.
Use
Parameters
410
Welcome
GetPlane
Method
Version : 6.5
Description :
This method gets the coordinates of the origin point and the normal direction of the
referenced plane.
Use
Parameters
Remarks
411
Welcome
ReverseNormal
Method
Version : 6.5
Description :
Use
IRefPlane.ReverseNormal
412
Welcome
IRefSegment
Interface
Version : 6.5
Description :
This interface is implemented in the RefSegment object, and gives access to the
specific features of this kind of reference (the common features being accessed
through the IRef interface).
413
Welcome
CurveType
Property
Version : 6.5
Description :
This property allows to get the type of the geometric curve attached to the referenced
segment.
Use
TopCurveType = IRefSegment.CurveType
414
Welcome
Identifier
Property
Version : 6.5
Description :
Use
Long = IRefSegment.Identifier
Remarks
415
Welcome
IRefSegments
Interface
Version : 6.5
Description :
This interface gives access to the collection of the segments contained in a curve.
416
Welcome
Count
Property
Version : 6.5
Description :
Use
Integer = IRefSegments.Count
417
Welcome
Item
Property
Version : 6.5
Description :
This property allows to get a segment of the collection (1 <= Index <= Count).
Use
418
Welcome
ISet
Interface
Version : 6.5
Description :
This interface is implemented in every kind of set elements, and gives access to the
features that are common to all of them.
419
Welcome
Elements
Property
Version : 6.5
Description :
This property gives access to the collection of elements contained in the set.
Use
ISetElements = ISet.Elements
420
Welcome
Shapes
Property
Version : 6.6
Description :
Use
Variant = ISet.Shapes
Parameters
Variant Shapes
RET Array of the shapes (IShape) (0 to UBound)
(array)
Remarks
With this method you can get the shapes of the set. The return value is an array of
IShape.
Example
421
Welcome
Dim i As Long
SetShapes = Set.Shapes
For i = 0 To ShapeCount
...
Next i
422
Welcome
Type
Property
Version : 6.6
Description :
Use
TopTypeSet = ISet.Type
ISet.Type = TopTypeSet
423
Welcome
ISetElements
Interface
Version : 6.5
Description :
This interface gives access to the collection of the elements contained by a set.
424
Welcome
Add
Method
Version : 6.5
Description :
Use
ISetElements.Add(Element)
Parameters
425
Welcome
Count
Property
Version : 6.5
Description :
Use
Integer = ISetElements.Count
426
Welcome
Item
Property
Version : 6.5
Description :
This property allows to get an element of the collection (1 <= Index <= Count).
Use
427
Welcome
Remove
Method
Version : 6.5
Description :
Use
ISetElements.Remove(Index)
Parameters
428
Welcome
IShape
Interface
Version : 6.5
Description :
This interface is implemented in every kind of shapes elements, and gives access to
the features that are common to all of them.
429
Welcome
CheckGeometry
Method
Version : 6.6
Description :
Use
Boolean = IShape.CheckGeometry()
Parameters
430
Welcome
CleanGeometry
Method
Version : 6.6
Description :
Use
IShape.CleanGeometry(LinTol, AngTol)
Parameters
Remarks
431
Welcome
Edges
Property
Version : 6.5
Description :
This property gives access to the collection of edges contained in the shape.
Use
IRefEdges = IShape.Edges
432
Welcome
Element
Property
Version : 6.5
Description :
This property gives access to the IElement interface of the Shape object.
Use
IElement = IShape.Element
Remarks
433
Welcome
Faces
Property
Version : 6.5
Description :
This property gives access to the collection of faces contained in the shape.
Use
IRefFaces = IShape.Faces
434
Welcome
FacetFace
Method
Version : 6.6
Description :
Use
Parameters
435
Welcome
Example
Dim Cv As TopSolid.Curve
......
' To get the FaceCount and the Faceids, see GetShellFaces or GetBodyFaces.
For i = 0 To FaceCount
'Face tessellation.
verticesNumber = UBound(vertX, 1) + 1
436
Welcome
stripNumber = UBound(vertexCountInStrip, 1) + 1
verticesCount = 0
For j = 0 To stripNumber 1
For k = 0 To vertexCountInStrip(j) 3
Next k
Next j
Next i
437
Welcome
FindFaceWithRay
Method
Version : 6.5
Description :
Use
IRefFace = IShape.FindFaceWithRay(Ox, Oy, Oz, Dx, Dy, Dz, Ix, Iy, Iz)
Parameters
438
Welcome
GetBodies
Method
Version : 6.6
Description :
Use
IShape.GetBodies(BodyIds)
Parameters
Variant BodyIds
OUT Array of the ids of the bodies (array of long)
(array)
Remarks
Example
439
Welcome
Dim Id As Long
Dim i As Integer
...
TopShape.GetBodies BodyIds
BodyCount = UBound(BodyIds, 1)
For i = 0 To BodyCount
Id = BodyIds(i)
...
Next i
440
Welcome
GetBodyFaces
Method
Version : 6.6
Description :
Use
IShape.GetBodyFaces(BodyId, FaceIds)
Parameters
Example
441
Welcome
Dim i As Integer
Dim j As Integer
...
TopShape.GetBodies BodyIds
BodyCount = UBound(BodyIds, 1)
For i = 0 To BodyCount
BodyId = BodyIds(i)
FaceCount = UBound(FaceIds, 1)
For j = 0 To FaceCount
FaceId = FaceIds(j)
...
Next j
Next i
442
Welcome
GetBodyMass
Method
Version : 6.6
Description :
Use
IShape.GetBodyMass(BodyId, Mass)
Parameters
443
Welcome
GetBodyShells
Method
Version : 6.6
Description :
Use
IShape.GetBodyFaces(BodyId, FaceIds)
Parameters
Remarks
A sheet body is made of one shell, and a solid body is made of one extrerior shell,
and zero or more interior shells, defining voids.
Example
444
Welcome
Dim i As Integer
Dim j As Integer
...
TopShape.GetBodies BodyIds
BodyCount = UBound(BodyIds, 1)
For i = 0 To BodyCount
BodyId = BodyIds(i)
ShellCount = UBound(ShellIds, 1)
For j = 0 To ShellCount
ShellId = ShellIds(j)
...
Next j
Next i
445
Welcome
GetBodyVertices
Method
Version : 6.6
Description :
Use
IShape.GetBodyVertices(BodyId, VerticesIds)
Parameters
Remarks
A sheet body is made of one shell, and a solid body is made of one extrerior shell,
and zero or more interior shells, defining voids.
Example
446
Welcome
Dim i As Integer
Dim j As Integer
...
TopShape.GetBodies BodyIds
BodyCount = UBound(BodyIds, 1)
For i = 0 To BodyCount
BodyId = BodyIds(i)
VerticesCount = UBound(VerticesIds, 1)
For j = 0 To VerticesCount
VertexId = VerticesIds(j)
...
Next j
Next i
447
Welcome
GetBodyVertices
Method
Version : 6.6
Description :
Use
IShape.GetBodyVolume(BodyId, Volume)
Parameters
448
Welcome
GetBoundingBox
Method
Version : 6.6
Description :
This method gets the bounding box of an object in the global frame.
Use
Parameters
449
Welcome
GetEdgeBsplineParams
Method
Version : 6.6
Description :
This method gets the parameters of a bspline curve. There are only the knots and the
control points in the range [Umin, Umax].
Use
Parameters
450
Welcome
451
Welcome
GetEdgeCircleParams
Method
Version : 6.6
Description :
Use
Parameters
452
Welcome
453
Welcome
GetEdgeBsplineParams
Method
Version : 6.6
Description :
Use
TopCurveType = IShape.GetEdgeCvType(EdgeId)
Parameters
Example
454
Welcome
Dim i As Integer
Dim j As Integer
Dim k As Integer
Dim l As Integer
Dim m As Integer
...
TopShape.GetBodies BodyIds
455
Welcome
BodyCount = UBound(BodyIds, 1)
For i = 0 To BodyCount
BodyId = BodyIds(i)
ShellCount = UBound(ShellIds, 1)
For j = 0 To ShellCount
ShellId = ShellIds(j)
FaceCount = UBound(FaceIds, 1)
FaceId = FaceIds(k)
LoopCount = UBound(LoopIds, 1)
For l = 0 To LoopCount
LoopId = LoopIds(i)
EdgeCount = UBound(EdgeIds, 1)
For m = 0 To EdgeCount
EdgeId = EdgeIds(m)
CurveType = TopShape.GetEdgeCvType
456
Welcome
...
Next m
Next l
Next k
Next j
Next i
457
Welcome
GetEdgeEllipseParams
Method
Version : 6.6
Description :
Use
Parameters
458
Welcome
459
Welcome
GetEdgeLength
Method
Version : 6.6
Description :
Use
IShape.GetEdgeLength(EdgeId, Length)
Parameters
460
Welcome
GetEdgeLineParams
Method
Version : 6.6
Description :
Use
Parameters
461
Welcome
GetEdgeNearest
Method
Version : 6.6
Description :
Use
Parameters
462
Welcome
GetEdgeNearestAsBspline
Method
Version : 6.6
Description :
This method gets the nearest point on an edge converted in bspline to a given point.
This function should be use when you have used the GetEdgeBsplineParams or
GetEdgeParasolidBsplineParams method to get the parameters of this edge.
Use
Parameters
463
Welcome
GetEdgeParasolidBsplineParams
Method
Version : 6.6
Description :
This method gets the parasolid parameters of a bspline curve. There are all the knots
and the control points that Parasolid returns (in and out the range [Umin, Umax]).
Use
Parameters
464
Welcome
465
Welcome
GetEdgePosition
Method
Version : 6.6
Description :
Use
Parameters
466
Welcome
GetEdgePositionAsBspline
Method
Version : 6.6
Description :
This method gets the position on the edge, converted in bspline, at a given parameter.
This function should be use when you have used the GetEdgeBsplineParams or
GetEdgeParasolidBsplineParams method to get the parameters of this edge.
Use
Parameters
467
Welcome
GetEdgeVertices
Method
Version : 6.6
Description :
This method finds the ids of the start and terminate vertices of an edge.
Use
Parameters
Remarks
Example
468
Welcome
Dim i As Integer
Dim j As Integer
Dim k As Integer
469
Welcome
Dim l As Integer
Dim m As Integer
...
TopShape.GetBodies BodyIds
BodyCount = UBound(BodyIds, 1)
For i = 0 To BodyCount
BodyId = BodyIds(i)
ShellCount = UBound(ShellIds, 1)
For j = 0 To ShellCount
ShellId = ShellIds(j)
FaceCount = UBound(FaceIds, 1)
FaceId = FaceIds(k)
LoopCount = UBound(LoopIds, 1)
For l = 0 To LoopCount
LoopId = LoopIds(i)
470
Welcome
EdgeCount = UBound(EdgeIds, 1)
For m = 0 To EdgeCount
EdgeId = EdgeIds(m)
...
Next m
Next l
Next k
Next j
Next i
471
Welcome
GetFaceAre
Method
Version : 6.6
Description :
Use
IShape.GetFaceArea(FaceId, Area)
Parameters
472
Welcome
GetFaceBsplineParams
Method
Version : 6.6
Description :
This method gets the parameters of a bspline surface. There are only the knots and
the control points in the range [Umin, Umax] [Vmin, Vmax].
Use
Parameters
473
Welcome
Variant VSinguls
(array)
OUT Long UNumCpts Number of U-control points.
OUT Long VNumCpts Number of V-control points.
OUT Long UNumKnots Number of the U-knots.
OUT Long VNumKnots Number of the V-knots.
OUT Long UDegree U-degree.
OUT Long VDegree V-degree.
Array of the X coordinates of the control points
OUT Variant CptsX (array)
(array of double).
Array of the Y coordinates of the control points
OUT Variant CptsY (array)
(array of double).
Array of the Z coordinates of the control points
OUT Variant CptsZ (array)
(array of double).
Variant Weights
OUT Array of the weights (array of double).
(array
Variant UKnots
OUT Array of the U-knots (array of double).
(array)
Variant VKnots
OUT Array of the V-knots (array of double).
(array)
OUT Boolean Sense True if the face is outside oriented.
474
Welcome
GetFaceConeParams
Method
Version : 6.6
Description :
Use
Parameters
475
Welcome
476
Welcome
GetFaceCylinderParams
Method
Version : 6.6
Description :
Use
Parameters
477
Welcome
478
Welcome
GetFaceLoops
Method
Version : 6.6
Description :
Use
IShape.GetFaceLoops(FaceId, LoopIds)
Parameters
Remarks
A face is made of one external loop, and zero or more internal loops, defining holes.
Example
479
Welcome
Dim i As Integer
Dim j As Integer
Dim k As Integer
Dim l As Integer
...
TopShape.GetBodies BodyIds
BodyCount = UBound(BodyIds, 1)
480
Welcome
For i = 0 To BodyCount
BodyId = BodyIds(i)
ShellCount = UBound(ShellIds, 1)
For j = 0 To ShellCount
ShellId = ShellIds(j)
FaceCount = UBound(FaceIds, 1)
FaceId = FaceIds(k)
LoopCount = UBound(LoopIds, 1)
For l = 0 To LoopCount
LoopId = LoopIds(i)
...
Next l
Next k
Next j
481
Welcome
Next i
482
Welcome
GetFaceNearest
Method
Version : 6.6
Description :
Use
Parameters
483
Welcome
GetFaceNormal
Method
Version : 6.6
Description :
Use
Parameters
484
Welcome
GetFaceBsplineParams
Method
Version : 6.6
Description :
This method gets the parameters of a bspline surface. There are all the knots and the
control points that Parasolid returns (in and out the range [Umin, Umax] [Vmin,
Vmax]).
Use
Parameters
485
Welcome
Variant VSinguls
OUT Array of the V-singuls (array of double).
(array)
OUT Long UNumCpts Number of U-control points.
OUT Long VNumCpts Number of V-control points.
OUT Long UNumKnots Number of the U-knots.
OUT Long VNumKnots Number of the V-knots.
OUT Long UDegree U-degree.
OUT Long VDegree V-degree.
Array of the X coordinates of the control points
OUT Variant CptsX (array)
(array of double).
Array of the Y coordinates of the control points
OUT Variant CptsY (array)
(array of double).
Array of the Z coordinates of the control points
OUT Variant CptsZ (array)
(array of double).
Variant Weights
OUT Array of the weights (array of double).
(array
Variant UKnots
OUT Array of the U-knots (array of double).
(array)
Variant VKnots
OUT Array of the V-knots (array of double).
(array)
OUT Boolean Sense True if the face is outside oriented.
486
Welcome
GetFacePlaneParams
Method
Version : 6.6
Description :
Use
Parameters
487
Welcome
488
Welcome
GetFacePosition
Method
Version : 6.6
Description :
Use
Parameters
489
Welcome
GetFaceShells
Method
Version : 6.6
Description :
Use
IShape.GetFaceShells(FaceId, ShellIds)
Parameters
Example
490
Welcome
Dim i As Integer
Dim j As Integer
Dim k As Integer
...
TopShape.GetBodies BodyIds
BodyCount = UBound(BodyIds, 1)
For i = 0 To BodyCount
BodyId = BodyIds(i)
FaceCount = UBound(FaceIds, 1)
For j = 0 To FaceCount
FaceId = FaceIds(j)
ShellCount = UBound(ShellIds, 1)
491
Welcome
ShellId = ShellIds(k)
...
Next k
Next j
Next i
492
Welcome
GetFaceSfType
Method
Version : 6.6
Description :
Use
TopSurfaceType = IShape.GetFaceSfType(FaceId)
Parameters
Example
493
Welcome
Dim i As Integer
Dim j As Integer
Dim k As Integer
Dim l As Integer
Dim m As Integer
...
TopShape.GetBodies BodyIds
BodyCount = UBound(BodyIds, 1)
For i = 0 To BodyCount
BodyId = BodyIds(i)
ShellCount = UBound(ShellIds, 1)
For j = 0 To ShellCount
494
Welcome
ShellId = ShellIds(j)
FaceCount = UBound(FaceIds, 1)
FaceId = FaceIds(k)
SurfaceType = TopShape.GetFaceSfType(FaceId)
...
Next k
Next j
Next i
495
Welcome
GetFaceSphereParams
Method
Version : 6.6
Description :
Use
Parameters
496
Welcome
497
Welcome
GetFaceTorusParams
Method
Version : 6.6
Description :
Use
Parameters
498
Welcome
499
Welcome
GetFaceVertices
Method
Version : 6.6
Description :
Use
IShape.GetFaceVertices(FaceId, VerticesIds)
Parameters
Example
500
Welcome
Dim i As Integer
Dim j As Integer
Dim k As Integer
...
TopShape.GetBodies BodyIds
BodyCount = UBound(BodyIds, 1)
For i = 0 To BodyCount
BodyId = BodyIds(i)
FaceCount = UBound(FaceIds, 1)
For j = 0 To FaceCount
FaceId = FaceIds(j)
VerticesCount = UBound(VerticesIds, 1)
501
Welcome
VertexId = VerticesIds(k)
...
Next k
Next j
Next i
502
Welcome
GetIdFromMoniker
Method
Version : 6.6
Description :
This method gets the id and the topology of the object which has the identifier
Moniker.
Use
Parameters
503
Welcome
GetLoopEdges
Method
Version : 6.6
Description :
Use
IShape.GetLoopEdges(LoopId, EdgeIds)
Parameters
Remarks
Example
504
Welcome
Dim i As Integer
Dim j As Integer
Dim k As Integer
Dim l As Integer
Dim m As Integer
...
505
Welcome
TopShape.GetBodies BodyIds
BodyCount = UBound(BodyIds, 1)
For i = 0 To BodyCount
BodyId = BodyIds(i)
ShellCount = UBound(ShellIds, 1)
For j = 0 To ShellCount
ShellId = ShellIds(j)
FaceCount = UBound(FaceIds, 1)
FaceId = FaceIds(k)
LoopCount = UBound(LoopIds, 1)
For l = 0 To LoopCount
LoopId = LoopIds(i)
EdgeCount = UBound(EdgeIds, 1)
506
Welcome
For m = 0 To EdgeCount
EdgeId = EdgeIds(m)
...
Next m
Next l
Next k
Next j
Next i
507
Welcome
GetLoopType
Method
Version : 6.6
Description :
Use
TopLoopType = IShape.GetLoopType(LoopId)
Parameters
508
Welcome
GetLoopVertices
Method
Version : 6.6
Description :
Use
IShape.GetLoopVertices(LoopId, VerticesIds)
Parameters
509
Welcome
GetMonikerFromId
Method
Version : 6.6
Description :
This method gets a unique and persistent identifier of the object, in a string. This
identifier is persistent until a topological modification on the shape.
Use
Parameters
Remarks
The loops without edges (like topLoopTypeVertex) and the vertices without edges
can't have unique identifier.
510
Welcome
GetShellFaces
Method
Version : 6.6
Description :
Use
IShape.GetShellFaces(ShellId, FaceIds)
Parameters
Remarks
Example
511
Welcome
Dim i As Integer
Dim j As Integer
Dim k As Integer
...
TopShape.GetBodies BodyIds
BodyCount = UBound(BodyIds, 1)
For i = 0 To BodyCount
BodyId = BodyIds(i)
ShellCount = UBound(ShellIds, 1)
For j = 0 To ShellCount
512
Welcome
ShellId = ShellIds(j)
FaceCount = UBound(FaceIds, 1)
FaceId = FaceIds(k)
...
Next k
Next j
Next i
513
Welcome
GetVertexPoint
Method
Version : 6.6
Description :
Use
Parameters
Example
514
Welcome
Dim i As Integer
Dim j As Integer
Dim k As Integer
515
Welcome
Dim l As Integer
Dim m As Integer
...
TopShape.GetBodies BodyIds
BodyCount = UBound(BodyIds, 1)
For i = 0 To BodyCount
BodyId = BodyIds(i)
ShellCount = UBound(ShellIds, 1)
For j = 0 To ShellCount
ShellId = ShellIds(j)
FaceCount = UBound(FaceIds, 1)
FaceId = FaceIds(k)
LoopCount = UBound(LoopIds, 1)
For l = 0 To LoopCount
LoopId = LoopIds(i)
516
Welcome
EdgeCount = UBound(EdgeIds, 1)
For m = 0 To EdgeCount
EdgeId = EdgeIds(m)
...
Next m
Next l
Next k
Next j
Next i
517
Welcome
IsFaceShellOuter
Method
Version : 6.6
Description :
Use
TopLog = IShape.IsFaceShellOuter(FaceId)
Parameters
518
Welcome
IsLoopOuter
Method
Version : 6.6
Description :
Use
TopLog = IShape.IsLoopOuter(LoopId)
Parameters
519
Welcome
IsSameOrientFinEdge
Method
Version : 6.6
Description :
This method tells if the edge is in the same sense as its fin on the specified face.
Use
Parameters
520
Welcome
IsShellOuter
Method
Version : 6.6
Description :
Use
TopLog = IShape.IsShellOuter(ShellId)
Parameters
521
Welcome
Purge
Method
Version : 6.6
Description :
Use
IShape.Purge()
522
Welcome
SimplifyGeometry
Method
Version : 6.6
Description :
Use
IShape.SimplifyGeometry(LinTol, AngTol)
Parameters
Remarks
523
Welcome
Type
Method
Version : 6.6
Description :
Use
TopShapeType = IShape.Type
524
Welcome
Transparency
Method
Version : 6.6
Description :
Use
Integer = IShape.Transparency
IShape.Transparency= Integer
Remarks
525
Welcome
IShapeOperation
Interface
Version : 6.5
Description :
This interface is implemented in every kind of shape operations elements, and gives
access to the features that are common to all of them.
526
Welcome
IShapeOperations
Interface
Version : 6.5
Description :
527
Welcome
AddIntersection
Method
Version : 6.5
Description :
Use
Parameters
Example
528
Welcome
AddSubstraction
Method
Version : 6.5
Description :
Use
Parameters
Example
529
Welcome
AddUnion
Method
Version : 6.5
Description :
Use
Parameters
Example
530
Welcome
Count
Property
Version : 6.5
Description :
Use
Integer = IShapeOperations.Count
531
Welcome
Item
Property
Version : 6.5
Description :
This property allows to get an operation of the collection (1 <= Index <= Count).
Use
532
Welcome
IShapePart
Interface
Version : 6.5
Description :
533
Welcome
Operations
Property
Version : 6.5
Description :
This property gives access to the collection of operations contained in the part.
Use
IShapeOperations = IShapePart.Operations
534
Welcome
Shape
Property
Version : 6.5
Description :
This property gives access to the IShape interface of the ShapePart object.
Use
IShape = IShapePart.Shape
Remarks
535
Welcome
IShapes
Interface
Version : 6.5
Description :
This interface is a collection that allows to scan through the shapes of the document,
and to create new shapes with the Add* methods.
536
Welcome
AddBasicBlock
Method
Version : 6.5
Description :
Use
IShape = IShapes.AddBasicBlock(Cx, Cy, Cz, Xx, Xy, Xz, Yx, Yy, Yz, LengthX, LengthY,
LengthZ)
Parameters
537
Welcome
Remarks
The X and Y directions do not need to be exactly perpendicular (the Y direction will
be automatically modified to become perpendicular to the X direction), but they must
not be parallel.
538
Welcome
AddBasicExtruded
Method
Version : 6.5
Description :
Use
Parameters
539
Welcome
Remarks
As the produced shape is not associative, the input curve may be deleted once used.
Example
540
Welcome
AddBasicRevolved
Method
Version : 6.5
Description :
Use
IShape = IShapes.AddBasicRevolved(Curve, Ox, Oy, Oz, Dx, Dy, Dz, Angle, Solid)
Parameters
Remarks
541
Welcome
As the produced shape is not associative, the input curve may be deleted once used.
542
Welcome
AddBasicRuled
Method
Version : 6.5
Description :
Use
Parameters
Remarks
As the produced shape is not associative, the input curves may be deleted once
used.
543
Welcome
AddExtrudedOnCurve
Method
Version : 6.5
Description :
Use
Parameters
Example
544
Welcome
545
Welcome
AddRevolvedOnCurve
Method
Version : 6.5
Description :
Use
Parameters
546
Welcome
AddRuledOnCurve
Method
Version : 6.5
Description :
Use
Parameters
547
Welcome
Count
Property
Version : 6.5
Description :
Use
Integer = IShapes.Count
548
Welcome
Item
Property
Version : 6.5
Description :
This property allows to get a shape of the collection (1 <= Index <= Count).
Use
549
Welcome
Sew
Method
Version : 6.5
Description :
Use
Parameters
Remarks
550
Welcome
Example
551
Welcome
IText
Interface
Version : 6.6
Description :
This interface is implemented in every kind of text elements, and gives access to the
features that are common to all of them.
552
Welcome
Element
Property
Version : 6.6
Description :
This property gives access to the IElement interface of the Text object.
Use
IElement = IText.Element
Remarks
553
Welcome
GetPlane
Method
Version : 6.6
Description :
Use
Parameters
554
Welcome
Height
Method
Version : 6.6
Description :
This property allows to get and to set the height of the text.
Use
Double = IText.Height
IText.Height = Double
Remarks
555
Welcome
SetPlane
Method
Version : 6.6
Description :
Use
Parameters
556
Welcome
String
Method
Version : 6.6
Description :
This property allows to get and to set the string of the text.
Use
String = IText.String
IText.String = String
557
Welcome
ITexts
Interface
Version : 6.56
Description :
This interface is a collection that allows to scan through the texts of the document,
and to create new texts with the Add* methods.
558
Welcome
AddBasic
Method
Version : 6.6
Description :
Use
IText = ITexts.AddBasic(String, Ox, Oy, Oz, VXx, VXy, VXz, VYx, VYy, VYz)
Parameters
559
Welcome
Count
Property
Version : 6.6
Description :
Use
Integer = ITexts.Count
560
Welcome
Item
Property
Version : 6.6
Description :
This property allows to get a text of the collection (1 <= Index <= Count).
Use
561
Welcome
TopAnalyse
Enum
Version : 6.6
Description :
Constants
562
Welcome
TopAskAnswer
Enum
Version : 6.5
Description :
This enum is used to define which kind of answer is received from the user when
asking him a question (see: IAsks interface).
Constants
topAskAnswerNothing = 0 : No answer (for example if the user has left the function
by pressing the escape key).
Example
563
Welcome
TopBomPropType
Enum
Version : 6.6
Description :
Constants
Example
564
Welcome
TopCircleType
Enum
Version : 6.6
Description :
This enum is used to define the type of circle when created with 3 points.
Constants
565
Welcome
TopColor
Enum
Version : 6.5
Description :
Constants
topColorDarkWhite = 3 : Gray.
topColorRed = 4 : Red.
topColorOrange = 6.
topColorDarkOrange = 7.
topColorYellow = 8.
topColorDarkYellow = 9.
topColorGreen = 10.
566
Welcome
topColorDarkGreen = 11.
topColorBlue = 12.
topColorDarkBlue = 13.
topColorViolet = 14.
topColorDarkViolet = 15.
topColorGray = 16.
topColorDarkGray = 17.
topColorOrangeRed = 18.
topColorDarkOrangeRed = 19.
topColorPink = 20.
topColorDarkPink = 21.
topColorGold = 22.
topColorDarkGold = 23.
topColorSpringGreen = 24.
topColorDarkSpringGreen = 25.
topColorCyan = 26.
topColorDarkCyan = 27.
topColorNavy = 28.
topColorDarkNavy = 29.
topColorMagenta = 30.
topColorDarkMagenta = 31.
567
Welcome
TopCurveType
Enum
Version : 6.5
Description :
This enum is used to define the type of geometric curve attached to an edge or a
segment.
Constants
topCurveTypeNone = 0 : No geometry.
topCurveTypeBSpline = 4 : B-spline.
568
Welcome
TopDesignMode
Enum
Version : 6.5
Description :
Constants
569
Welcome
TopDirection
Enum
Version : 6.5
Description :
This enum is used to define some particular directions on a given coordinate system.
Constants
570
Welcome
TopDirection
Enum
Version : 6.6
Description :
Constants
571
Welcome
TopInterface
Enum
Version : 6.6
Description :
Constants
572
Welcome
TopLevelProperty
Enum
Version : 6.6
Description :
This enum is used to define the property to apply to a level or to a list a level.
Constants
topEnable = 0 : Enable.
topDisable = 1 : Disable.
topFreeze = 2 : Freeze.
topUnfreeze = 3 : Unfreeze.
topGroup = 4 : Group.
topSplit = 5 : Ungroup.
topName = 6 : Name.
573
Welcome
TopLog
Enum
Version : 6.6
Description :
Constants
topLogUnknown = -1
topLogBoolean = 0
topLogTrue = 1
574
Welcome
TopLoopType
Enum
Version : 6.6
Description :
This enum is used to define the type of the loop (like the parasolid loop type,
PK_LOOP_type_t).
Constants
575
Welcome
TopMessageAnswer
Enum
Version : 6.7
Description :
This enum is used to specified which button has been clicked by user in the
messagebox.
Constants
topMessageAnswerOk = 1.
topMessageAnswerCancel = 2.
topMessageAnswerRetry = 4.
topMessageAnswerYes = 6.
topMessageAnswerNo = 7.
576
Welcome
TopMessageButton
Enum
Version : 6.7
Description :
This enum is used to specified which buttons should be displayed in the message box.
Constants
577
Welcome
TopMessageIcon
Enum
Version : 6.7
Description :
This enum is used to specified which icon should be displayed in the message box.
Constants
578
Welcome
TopPaperFormat
Enum
Version : 6.5
Description :
Constants
topPaperFormatAH = 10 : Horizontal A.
topPaperFormatBH = 11 : Horizontal B.
topPaperFormatCH = 12 : Horizontal C.
579
Welcome
topPaperFormatDH = 13 : Horizontal D.
topPaperFormatEH = 14 : Horizontal E.
topPaperFormatAV = 15 : Vertical A.
topPaperFormatBV = 16 : Vertical B.
topPaperFormatCV = 17 : Vertical C.
topPaperFormatDV = 18 : Vertical D.
topPaperFormatEV = 19 : Vertical E.
topPaperFormatDinA4V = 20.
topPaperFormatDinA3H = 21.
topPaperFormatDinA2H = 22.
topPaperFormatDinA1H = 23.
topPaperFormatDinA0H = 24.
580
Welcome
TopParamUnitType
Enum
Version : 6.6
Description :
Constants
topParamUnitTypeVoid = 0 : No dimension.
topParamUnitTypeAngle = 1 : Angle.
topParamUnitTypeLength = 2 : Length.
topParamUnitTypeVolume = 4 : Volume.
topParamUnitTypeMass = 5 : Mass.
topParamUnitTypeTime = 6 : Time.
topParamUnitTypeSpeed = 7 : Speed.
topParamUnitTypeAccel = 8 : Acceleration.
topParamUnitTypeTemp = 11 : Temperature.
581
Welcome
topParamUnitTypePower = 15 : Power.
topParamUnitTypeFrequency = 22 : Frequency.
topParamUnitTypeEnergy = 23 : Energy.
topParamUnitTypePotential = 32 : Potential.
topParamUnitTypeResistance = 34 : Resistance.
topParamUnitTypeResistivity = 35 : Resistivity.
582
Welcome
topParamUnitTypeResolution = 44 : Resolution.
583
Welcome
TopShapeType
Enum
Version : 6.6
Description :
Constants
584
Welcome
TopSurfaceType
Enum
Version : 6.5
Description :
This enum is used to define the type of geometric surface attached to a face.
Constants
topSurfaceTypeNone = 0 : No geometry.
topSurfaceTypePlane = 1 : Plane.
topSurfaceTypeCylinder = 2 : Cylinder.
topSurfaceTypeCone = 3 : Cone.
topSurfaceTypeSphere = 4 : Sphere.
topSurfaceTypeTorus = 5 : Torus.
585
Welcome
TopStandard
Enum
Version : 6.5
Description :
Constants
586
Welcome
TopTopo
Enum
Version : 6.6
Description :
Constants
587
Welcome
TopTypeSet
Enum
Version : 6.6
Description :
Constants
588
Welcome
Introduction
The following examples have been developed and tested using Microsoft Visual
Basic v6, they may not work on other products or different releases of VB.
Please note that most of the examples are code extracts, and cannot be run as such.
In particular, when one or several lines of code are omitted for clarity, they will be
replaced by "...".
589
Welcome
How to start
Example
Version : 6.6
Description :
This example shows how to start with the API Com and Visual Basic.
Option Explicit
On the form loading, initialize the application and create a new document .top
590
Welcome
End Sub
' Centre = 0, 0, 0
' X axis = 1, 0, 0
' Y axis = 0, 1, 0
TopCircle.Element.Name = "Circle_1"
591
Welcome
'error management
Exit Sub
End If
' Z axis = 0, 0, 1
TopShape.Element.Color = topColorBlue
592
Welcome
Set TopCircle = Nothing
Close TopSolid
TopApp.Quit
593
Welcome
End Sub
594
Welcome
Example
Version : 6.5
Description :
This example shows how to check for TopSolid version at the beginning of a program.
...
End
End If
595
Welcome
End
End If
...
596
Welcome
Example
Version : 6.5
Description :
This example shows how to set program units to work in radians for angles and inches
for lengths.
...
...
TopApp.ProgramUnitAngle = "rad"
TopApp.ProgramUnitLengh = "in"
...
597
Welcome
Opening a document
Example
Version : 6.5
Description :
...
...
598
Welcome
Example
Version : 6.5
Description :
...
Dim states As
599
Welcome
levelsname(0) = "level10"
levelsname(1) = "level11"
levelsname(2) = "level12"
levelsname(3) = "level13"
group1(0) = 5
group1(1) = 6
group1(2) = 7
600
Welcome
group2(0) = "level20"
group2(1) = "level21"
group2(2) = "level22"
601
Welcome
602
Welcome
' . groupname = "Groupe 2" (the level 20 is in the group "Groupe 2")
603
Welcome
Example
Version : 6.5
Description :
This example shows how to import an IGES file, and scan the created documents.
...
604
Welcome
...
Next
...
605
Welcome
Example
Version : 6.5
Description :
...
If doc.Visible Then
doc.PrintOut
End If
Next
...
606
Welcome
Example
Version : 6.5
Description :
...
...
The second way allows to override the user default choices (as displayed in the final
dialog box presented when using the "File | New" command, in the mode "Without
template") :
...
607
Welcome
...
608
Welcome
Example
Version : 6.5
Description :
...
Dim pa As TopSolid.Parameter
...
609
Welcome
Example
Version : 6.5
Description :
...
Dim cv As TopSolid.Curve
...
610
Welcome
Example
Version : 6.5
Description :
...
Dim cv As TopSolid.Curve
pxs(0) = 0
pys(0) = 0
pzs(0) = 0
611
Welcome
pxs(1) = 0.05
pys(1) = 0
pzs(1) = 0
vpxs = pxs
vpys = pys
vpzs = pzs
...
612
Welcome
Example
Version : 6.5
Description :
...
Dim cv As TopSolid.Curve
613
Welcome
vcvs = cvs
Set cv = TopDoc.Curves.AddBasicComposite(vcvs)
...
614
Welcome
Example
Version : 6.5
Description :
...
Dim cv As TopSolid.Curve
Dim sh As TopSolid.Shape
615
Welcome
cv.Element.Delete
Set cv = Nothing
...
616
Welcome
Example
Version : 6.5
Description :
...
Dim cv As TopSolid.Curve
Dim ln As TopSolid.Parameter
Dim sh As TopSolid.Shape
cv.Element.Blanked = True
617
Welcome
...
618
Welcome
Example
Version : 6.5
Description :
...
Dim cv As TopSolid.Curve
cv.Element.Delete
619
Welcome
Set cv = Nothing
cv.Element.Delete
Set cv = Nothing
Call shpart.Operations.AddIntersection(shtool)
...
620
Welcome
Creating a component
Example
Version : 6.5
Description :
...
Call TopDoc.Assembly.Elements.Add(compo)
621
Welcome
...
622
Welcome
Example
Version : 6.5
Description :
...
Call TopDoc.Assembly.Elements.Add(compo)
623
Welcome
...
624
Welcome
Example
Version : 6.5
Description :
This example shows how to find out the number of invalid elements in a TopSolid
document by accessing to the set of invalid elements.
nbi = 0
Else
625
Welcome
nbi = setInv.Elements.Count
End If
...
626
Welcome
Getting a BOM
Example
Version : 6.6
Description :
Dim i As Integer
For i = 1 To TopBom.SubLevels.Count
627
Welcome
BomGetShapes TopBomLevel
Next i
Dim i As Integer
For i = 1 To TopBomLevel.SubLevels.Count
BomGetShapes TopBomSubLevel
Next i
628
Welcome
Else
' if there are no sublevels, we can get the shapes of the sublevel and analyze them
TopShapes = TopBomLevel.GetShapes
TopShapeCount = UBound(TopShapes, 1)
For i = 0 To TopShapeCount
Exit Sub
End If
...
Next i
End If
End Sub
629
Welcome
Example
Version : 6.5
Description :
...
Dim ix As Integer
Dim sh As TopSolid.Shape
nshs = TopDoc.Shapes.Count
630
Welcome
ReDim shs(nshs - 1)
ish = 0
For ix = 1 To TopDoc.Shapes.Count
Set sh = TopDoc.Shapes(ix)
Set shs(ish) = sh
ish = ish + 1
Else
nshs = nshs - 1
End If
Next ix
vshs = shs
631
Welcome
Set sh = vsh
Next
...
632
Welcome
Introduction
This chapter contains the API release notes of each TopSolid version.
633
Welcome
Introduction
This section describes the changes of the API that appeared in the v6.8 release.
634
Welcome
Creations
Enums
Events
Interfaces
Properties
Methods
Collections
635
Welcome
Examples
636
Welcome
Introduction
This section describes the changes of the API that appeared in the v6.7 release.
637
Welcome
Creations
Enums
Events
Interfaces
Properties
638
Welcome
Methods
639
Welcome
Collections
Examples
640
Welcome
Introduction
This section describes the changes of the API that appeared in the v6.6 release.
641
Welcome
Creations
Enums
Interfaces
Properties
642
Welcome
Methods
Collections
643
Welcome
Examples
644
Welcome
Introduction
A rather confidential limited Automation API was previously available, and has been
maintained in this version, it is accessible through the TopSolid.PDM object.
Do not use this object for new developments, as it is only there to allow the
migration of the existing applications : this part of the API is obsolete and will be
removed in a future version of TopSolid.
645