I have problem - I don't understand how to get view from draft document to use components. For example, I have draft document of assembly. I need to get components of this assembly, which showed on draft document.
You can use Spy for Solid Edge to access to the description of what you have in your draft document (thanks Jason) .
You can access to the component of an assembly in your draft for the draft Document or the drawing view.
From draft document : ActiveDocument.ModelLinks.Item(1)
Item number depending of how many file are present in the draft document.
Hello tucha_te, rbertin has shown you the right direction with getting the model links to the assembly model of the view.
To answer your question as in "- I don't understand how to get view from draft document...",
the following lines will step wise take you to the assembly ocurrences beginning with the view in the Draft sheet:
Dim oApp As SolidEdgeFramework.Application = Marshal.GetActiveObject("SolidEdge.Application")
Dim oDoc As SolidEdgeDraft.DraftDocument = oApp.ActiveDocumentDim oSheet As SolidEdgeDraft.Sheet = oDoc.ActiveSheetDim oView As DrawingView = oSheet.DrawingViews.Item(1)Dim oModelLink As ModelLink = oView.ModelLinkDim sAssemblyName = oModelLink.FileNameDim oAsmDoc As AssemblyDocument = oApp.Documents.Open(sAssemblyName)Dim oOccurrences As Occurrences = oAsmDoc.Occurrences