I am Trying to add the category Field to the parts list, if a sting exists in the field. I want to run this as a rule at the Drawing Level. I can check if there is a sting in the Category Field But not sure how to add this in the Parts List.
Solved! Go to Solution.
Solved by iLogicfreak. Go to Solution.
Do you mean you just want to add a "Field" column to the parts list? It sounds like you mean you want to add the column only for the entries that already have information in the "Field" property. But a column is a column, it's going to be present for every row in the parts list; it'll simply be blank for any entry that doesn't have a value in the "Field" property.
How about two different Parts List styles, and simply have your iLogic rule switch styles?
Sam B
Inventor 2012 Certified Professional
Please click "Accept as Solution" if this response answers your question.
-------------------------------------------------------------------------------------
Inventor Professional 2013 SP1.1 Update 2
Windows 7 Enterprise 64-bit, SP1
HP EliteBook 8770w; 8 GB RAM; Core™ i7-3720QM 2.60 GHz; Quadro K4000M
SpaceExplorer/SpaceNavigator NB, driver 3.16.2
still waiting for a foreshortened radius dimensioning tool in Drawing Manager
Fist of all, I would like to thank you for your inputs.
Yes I want to add a column and just not a field a particular column. Certain parts will have a blank field but that's a not a problem.
I did think about that two different styles but instead wanted to take this route because if need I could mix and match with Certain condition in the future.
I did write this Rule to Add the column but I get an Error stating "Unexpected Error". I am new to ilogic and don't have a programming background so I was not sure how to debug this.
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
oSheet = oDrawDoc.ActiveSheet
For Each oPartList As PartsList In oSheet.PartsLists
Dim CatCol As PartsListColumn
CatCol = oPartList.PartsListColumns.Add(kCategoryDocSummaryInformation,"{D5CDD502-2E9C-101B-9397-08002B2CF9AE}","2")
Next
Hey,
I figured out the Problem and this is the modified code. I'Ve tried to add the CATEGORY column from iPropertie.
Please Find the code Below.
Thanks Guys
Raam
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
oSheet = oDrawDoc.ActiveSheet
For Each oPartList As PartsList In oSheet.PartsLists
Dim oPropTyp As String
oPropType = Inventor.PropertyTypeEnum.kFileProperty
Dim CatCol As PartsListColumn
CatCol = oPartList.PartsListColumns.Add(oPropType,"{D5CDD502-2E9C-101B-9397-08002B2CF9AE}","2","3")
Next