Gets or sets the standard Parasolid name attribute of the entity.
.NET Syntax
Visual Basic (Declaration) | |
---|
Property ModelName As String |
Visual Basic (Usage) | |
---|
Dim instance As IEntity
Dim value As String
instance.ModelName = value
value = instance.ModelName
|
C# | |
---|
string ModelName {get; set;} |
C++/CLI | |
---|
property String^ ModelName {
String^ get();
void set (String^ value);
} |
Return Value
Standard Parasolid name attribute
Example
This Visual Basic subroutine shows how to write a Parasolid name attribute to each face in the model.
Private Sub NameAllFaces (ByRef swBody as SldWorks.body2)
Dim swFace as Sldworks.Face2
Dim swEnt As Sldworks.Entity
Dim Name, RootName As String
Dim Index As Integer
Dim ret as Boolean
swFace = swBody.GetFirstFace
Index = 0
RootName = "My Face #"
Do While Not swFace is Nothing
swEnt = swFace
Name = RootName + str(Index)
swEnt.ModelName = Name
Index = Index + 1
swFace = swFace.GetNextFace
Loop
End Sub
See Also