Reply

show all modelmember in draftview

Hi

 

Is there a api command to show all modelmember in draftview ?

 

a want to unhide a modelmember in view but there are not in the list


For i = 1 To View.ModelMembers.Item(1).ModelMembers.Count
   If View.ModelMembers.Item(1).ModelMembers.Item(i).ComponentName Like "Gravure*" Then
      View.ModelMembers.Item(1).ModelMembers.Item(j).VisibleEdgeStyleName = "Gravure"
      View.ModelMembers.Item(1).ModelMembers.Item(j).DisplayType = seShowPart
      View.ModelMembers.Item(1).ShowHiddenEdges = True
End If
Next i

 

 

Thank

 

Eric

1 REPLY

Re: show all modelmember in draftview

Iterate through all ModelMembers of the toplevel ModelMember.

This code is listing all members correctly for me.

    '----------------------------------------------------------------------
    ' DFT: List all model members of the selected drawing view
    '----------------------------------------------------------------------
    Dim objDoc As SolidEdgeDraft.DraftDocument = objApp.ActiveDocument
    Dim objDrawView As DrawingView = objDoc.SelectSet.Item(1)
    For Each objDocMember As ModelMember In objDrawView.ModelMembers
      Debug.Print(" * " & objDocMember.FileName)
      For Each objMember As ModelMember In objDocMember.ModelMembers
        Debug.Print("   - " & objMember.ComponentName)
      Next
    Next