Gets or sets the standard Parasolid name attribute of the entity.
.NET Syntax
Visual Basic (Declaration) | |
---|
Property ModelName As System.String |
Visual Basic (Usage) | |
---|
Dim instance As IEntity
Dim value As System.String
instance.ModelName = value
value = instance.ModelName |
C# | |
---|
System.string ModelName {get; set;} |
C++/CLI | |
---|
property System.String^ ModelName {
System.String^ get();
void set ( & System.String^ value);
} |
Property 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