Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is the way to add category field to Parts List using iLogic ??

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
iLogicfreak
1025 Views, 4 Replies

Is the way to add category field to Parts List using iLogic ??

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.

4 REPLIES 4
Message 2 of 5
DRoam
in reply to: iLogicfreak

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.

Message 3 of 5
SBix26
in reply to: iLogicfreak

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

Message 4 of 5
iLogicfreak
in reply to: DRoam

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
Message 5 of 5
iLogicfreak
in reply to: iLogicfreak

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report