Hi,
I'm attempting to use iLogic to scan through the Partslist in an idw, check a column / field in each row, if say it contains an 'x' I want to hide that row.
However I'm stuck at even creating a partslist collection at the moment.
Any help would be greatly appreciated.
I'm using Inventor 2012.
Many thanks in advance.
Michael.
Solved! Go to Solution.
Solved by Curtis_Waguespack. Go to Solution.
Hi michael.horsler,
Here are a couple of links to past questions that I think will get you pointed in the right direction:
ilogic generate parts list:
ilogic scan parts list for specific content:
Note too that to hide a row in a parts list you would use something such as:
oPartList.PartsListRows.Item(i).Visible = False
as in this example:
' Set a reference to the drawing document. ' This assumes a drawing document is active. Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument ' Set a reference to the first parts list on the active sheet. ' This assumes that a parts list is on the active sheet. Dim oPartList As PartsList oPartList = oDrawDoc.ActiveSheet.PartsLists.Item(1) ' Iterate through the contents of the parts list. Dim i As Long For i = 1 To oPartList.PartsListRows.Count 'look at only the part number column oCell = oPartList.PartsListRows.Item(i).Item("PART NUMBER") 'find a specific value If oCell.Value = "x" Then 'hide the row oPartList.PartsListRows.Item(i).Visible = False End if Next
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Hello everybody!
I have a question about the following rule:
For Each oObject In ThisDoc.Document.SelectSet
'oObject is one of the first selection.
'Type after = what to do with name
oObject.Name = oObject.Name+"_F01"
Next
I've wrote this rule to make it easier to name the different workplanes.
The next step i would like to do, is to give it a automatically numbering (++1), from 1 to the last object.
Does somebody know the commands for this in ilogic?
Let me know, and thank you!
Hi @Anonymous,
Welcome to the forum.
Please note that your question is not related to this topic, and therefore would be better posted as an independent topic.
Please create a new topic on the Inventor Customization forum and I'm certain someone will provide a solution:
http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com