@RoyWickrama_RWEI,
Try below iLogic code.
Sub Main()
oRuleNo = "RULE NO: iL0071"
'Dim oDoc As DrawingDocument
'oDoc = ThisApplication.ActiveDocument
oDoc = ThisApplication.ActiveDocument
'check file type
If oDoc.DocumentType = DocumentTypeEnum.kDrawingDocumentObject Then
MessageBox.Show("Drawing document!", oRuleNo)
oProcess_Dwg()
End If
If oDoc.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then
MessageBox.Show("ASSEMBLY Document!", oRuleNo)
oProcess_Assy()
End If
If oDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject Then
MessageBox.Show("PART Document!", oRuleNo)
oProcess_Part()
End If
End Sub
Sub oProcess_Dwg()
oModelDoc = IO.Path.GetFileName(ThisDrawing.ModelDocument.FullFileName)
End Sub
Sub oProcess_Assy()
End Sub
Sub oProcess_Part()
End Sub
Thanks and regards,
CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network