Community
Hi
I want to know if there is any api to check if a particular drawing is a assembly drawing or part drawing.Please help.
Solved! Go to Solution.
Solved by Vladimir.Ananyev. Go to Solution.
Here is the VBA sample to illustrate possible solution:
Private Sub DrawingRefs() Dim oDoc As DrawingDocument Set oDoc = ThisApplication.ActiveDocument Dim oSheet As Sheet Set oSheet = oDoc.ActiveSheet Dim oView As DrawingView Set oView = oSheet.DrawingViews.Item(1) Dim oRef As DocumentDescriptor Set oRef = oView.ReferencedDocumentDescriptor Select Case oRef.ReferencedDocumentType Case DocumentTypeEnum.kAssemblyDocumentObject MsgBox "Assembly Document" Case DocumentTypeEnum.kPartDocumentObject MsgBox "Part Document" Case Else MsgBox "Document - ???" End Select End Sub
Hope idea is clear.