Is it possible to make an iLogic if statement that can tell the difference between parts and assemblies? I want to add iLogic to our (part and assembly) templates so that when placed in the drawing level the parts list description will be different. I know that this is not the proper way to do it and there are better ways but I need to know if this way is possible. I would appreciate any help that you could give.
Example:
At assembly level I want the description (custom I property: Description 1) to populate the parts list.
At part level I want the description (custom I property: Description 2) to populate the parts list.
Thanks
JD
Solved! Go to Solution.
Solved by MechMachineMan. Go to Solution.
Solved by cwhetten. Go to Solution.
The following should get you rolling:
DocType = ThisDoc.Document.DocumentType If DocType = DocumentTypeEnum.kAssemblyDocumentObject Then 'it's an assembly file Else If DocType = DocumentTypeEnum.kPartDocumentObject Then 'it's a part file Else If DocType = DocumentTypeEnum.kDrawingDocumentObject Then 'it's a drawing file End If
Cameron Whetten
Inventor 2016
Alternatively:
Select Case ThisDoc.Document.DocumentType Case DocumentTypeEnum.kAssemblyDocumentObject 'it's an assembly file Case DocumentTypeEnum.kPartDocumentObject 'it's a part file Case DocumentTypeEnum.kDrawingDocumentObject 'it's a drawing file Case Else End Select OR: Select Case True Case ThisDoc.Document.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject 'it's an assembly file Case ThisDoc.Document.DocumentType = DocumentTypeEnum.kPartDocumentObject 'it's a part file Case ThisDoc.Document.DocumentType =DocumentTypeEnum.kDrawingDocumentObject 'it's a drawing file Case Else End Select