ReferenceModel Class |
The ReferenceModel class contains methods related to reference models.
A reference model is a reference of an external model.
Inheritance Hierarchy
SystemObject
Tekla.Structures.ModelObject
Tekla.Structures.ModelModelObject
Tekla.Structures.ModelReferenceModel
Tekla.Structures.ModelObject
Tekla.Structures.ModelModelObject
Tekla.Structures.ModelReferenceModel
Namespace: Tekla.Structures.Model
Assembly: Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
The ReferenceModel type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ReferenceModel |
Initializes a new instance of the ReferenceModel class.
The default values are as follows:
| |
ReferenceModel(String, Point, Double) |
Initializes a new instance of the ReferenceModel class.
Creates a new reference model instance using the given filename, position and scale.
|
Properties
Name | Description | |
---|---|---|
ActiveFilePath |
Gets the path to the local copy of the current revision of the reference model.
| |
BasePointGuid |
The GUID of the used base point. Empty if base point is not used.
| |
Filename |
The path to the original location of the reference file.
| |
Identifier |
The identifier of the object.
(Inherited from Object.) | |
IsUpToDate | Gets if the object does not have a modification which is not shared. (Inherited from ModelObject.) | |
ModelGUID | Obsolete.
The ModelGUID of the reference model in the Project Center.
| |
ModificationTime | Gets latest time of the object was modified or created. (Inherited from ModelObject.) | |
Position |
The position of the reference model.
| |
ProjectGUID | Obsolete.
The ProjectGUID of the reference model in the Project Center.
| |
Rotation | Obsolete. Gets or sets value of rotation around Z axis (degrees). | |
Rotation3D | Gets or sets value of 3d rotation. | |
Scale |
The scale of the reference model.
| |
Title |
The reference model name(title).
| |
UseWorkplane | Sets whether workplane is used. | |
VersionGUID | Obsolete.
The VersionGUID of the reference model in the Project Center.
| |
Visibility |
The visibility of the reference model in the model view.
|
Methods
Name | Description | |
---|---|---|
CompareTo |
Compares Identifiers of model objects.
(Inherited from ModelObject.) | |
Delete |
Deletes the reference model with the given identifier.
(Overrides ModelObjectDelete.) | |
Equals |
Check if Identifiers of model objects are same.
(Inherited from ModelObject.) | |
GetAllReportProperties |
Retrieves all properties for the model object in one hashtable.
Type for the returned value must be checked using type casting.
(Inherited from ModelObject.) | |
GetAllUserProperties |
Retrieves all properties for the model object in one hashtable.
Type for the returned value must be checked using type casting.
(Inherited from ModelObject.) | |
GetChildren |
Returns an enumerator of all the children reference model objects.
(Overrides ModelObjectGetChildren.) | |
GetConvertedObjects |
Returns an enumerator of model object converted from the reference model.
| |
GetCoordinateSystem |
Returns the coordinate system for the given model object.
(Inherited from ModelObject.) | |
GetCurrentRevision |
Gets the current revision.
| |
GetDoubleReportProperties |
Retrieves multiple double report properties for the model object. It is faster
to fetch multiple properties at once.
(Inherited from ModelObject.) | |
GetDoubleUserProperties |
Retrieves all double properties for the model object.
(Inherited from ModelObject.) | |
GetDynamicStringProperty |
Gets a dynamic string property from the model object.
(Inherited from ModelObject.) | |
GetFatherComponent |
Returns the father component of the model object.
(Inherited from ModelObject.) | |
GetHierarchicObjects |
Returns an enumerator of all the connected hierarchic objects.
(Inherited from ModelObject.) | |
GetIntegerReportProperties |
Retrieves multiple integer report properties for the model object. It is faster
to fetch multiple properties at once.
(Inherited from ModelObject.) | |
GetIntegerUserProperties |
Retrieves all integer properties for the model object.
(Inherited from ModelObject.) | |
GetPhase |
Retrieves the phase of the model object (the phase number, the phase name,
the phase comment and whether the phase is the current one or not).
(Inherited from ModelObject.) | |
GetReferenceModelObjectByExternalGuid |
Gets reference model object by external (IFC) guid from this reference model.
| |
GetReferenceModelObjectGuidsByExternalGuids |
Gets reference model object guids by external guids.
| |
GetReportProperty(String, Double) |
Retrieves a double property of the report for the model object.
(Inherited from ModelObject.) | |
GetReportProperty(String, Int32) |
Retrieves an integer property of the report for the model object.
(Inherited from ModelObject.) | |
GetReportProperty(String, String) |
Retrieves a string property of the report for the model object.
(Inherited from ModelObject.) | |
GetRevisions |
Gets the reference models available revisions.
| |
GetStringReportProperties |
Retrieves multiple string report properties for the model object. It is faster
to fetch multiple properties at once.
(Inherited from ModelObject.) | |
GetStringUserProperties |
Retrieves all string properties for the model object.
(Inherited from ModelObject.) | |
GetUserProperty(String, Double) |
Retrieves a double property for the model object.
(Inherited from ModelObject.) | |
GetUserProperty(String, Int32) |
Retrieves an integer property for the model object.
(Inherited from ModelObject.) | |
GetUserProperty(String, String) |
Retrieves a string property for the model object.
(Inherited from ModelObject.) | |
Insert |
Inserts the reference model into the model.
(Overrides ModelObjectInsert.) | |
Modify |
Modifies the reference model with the given identifier.
(Overrides ModelObjectModify.) | |
RefreshFile |
Reload the reference file from the location specified by Filename.
If the file has changed, a new revision will be created and taken into use.
Note that if a new revision was successfully created, the ActiveFilePath is changed.
| |
RemoveRevision |
Removes the given revision from the reference model.
| |
Select |
Selects the reference model with the given identifier.
(Overrides ModelObjectSelect.) | |
SetAsCurrentRevision(ReferenceModelRevision) |
Sets the given revision as current revision.
| |
SetAsCurrentRevision(Int32, Int32) |
Sets the given revision as current revision.
| |
SetDynamicStringProperty |
Sets a dynamic string property for the model object.
(Inherited from ModelObject.) | |
SetLabel |
Sets a label for an object when a new instance is created, this method must be called before Insert.
The label is used in plug-ins for identifying the changed object in modification.
(Inherited from ModelObject.) | |
SetPhase |
Sets the phase of the model object.
(Inherited from ModelObject.) | |
SetUserProperties |
Sets multiple properties for the model object.
(Inherited from ModelObject.) | |
SetUserProperty(String, Double) |
Sets a double property for the model object.
(Inherited from ModelObject.) | |
SetUserProperty(String, Int32) |
Sets an integer property for the model object.
(Inherited from ModelObject.) | |
SetUserProperty(String, String) |
Sets a string property for the model object.
(Inherited from ModelObject.) |
Examples
using Tekla.Structures.Model; public class Example { public void Example1() { ReferenceModel ReferenceModel = new ReferenceModel(); ReferenceModel.Filename = "c:\\TeklaStructuresModels\\reference_model.dwg"; ReferenceModel.Scale = 1.0; bool Result = false; Result = ReferenceModel.Insert(); } }
See Also