Message 1 of 3
Craete labels for geometry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
i Want to add geometry ilogic entity names on the geometry tab,
i know the number of the edge internally used the attribute set to look for it but now i have to work backwards since its a derived part and those names were lost, only the edge number i kept through a custom iproperty.
can i create those labels with ilogic???
this is what i have so far.
Dim oPart As PartDocument = ThisDoc.Document Dim oPrtDef As PartComponentDefinition = oPart.ComponentDefinition Dim Edge_Number_1 As Double = iProperties.Value("Custom","Left Hole Edge Number") Dim Edge_Number_2 As Double = iProperties.Value("Custom","Right Hole Edge Number") Dim Edge_Name_1 As String = iProperties.Value("Custom","Left Hole Edge Name") Dim Edge_Name_2 As String = iProperties.Value("Custom","Right Hole Edge Name") Dim oEdge1 As Edge Dim oEdge2 As Edge Dim entity_1 As Object Dim entity_2 As Object Dim oInsert As InsertConstraint Dim oEdges As Edges Dim AttSets As AttributeSets Dim oAttribSet As AttributeSet Dim oAttrib As Inventor.Attribute For x = 1 To oPrtDef.SurfaceBodies(1).Edges.Count oEdge = oPrtDef.SurfaceBodies(1).Edges.Item(x) If x = Edge_Number_1 Then entity_1 = oEdge oEdge1 = oEdge entity_1 = oEdge1 AttSets = oEdge1.AttributeSets If AttSets.NameIsUsed("iLogicEntityNameSet") = True Then oAttribSet = AttSets.Item("iLogicEntityNameSet") oAttrib = oAttribSet.Item("iLogicEntityName") oAttrib.Value = Edge_Name_1 End If End If If x = Edge_Number_2 Then oEdge2 = oEdge entity_1 = oEdge2 AttSets = oEdge2.AttributeSets If AttSets.NameIsUsed("iLogicEntityNameSet") = True Then oAttribSet = AttSets.Item("iLogicEntityNameSet") oAttrib = oAttribSet.Item("iLogicEntityName") oAttrib.Value = Edge_Name_2 End If End If Next x