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: 

iLogic rule - Scanning PartsList Rows

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
michael.horsler
2049 Views, 4 Replies

iLogic rule - Scanning PartsList Rows

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.

Tags (3)
4 REPLIES 4
Message 2 of 5

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:

http://forums.autodesk.com/t5/Inventor-General-Discussion/ilogic-generate-parts-list/m-p/3646032#M45...

 

ilogic scan parts list for specific content:

http://forums.autodesk.com/t5/Inventor-General-Discussion/iLogic-Rule-to-Print-String-to-Parts-List/...

 

 

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

Message 3 of 5

Fantastic.

 

Greatly appreciated. 🙂

 

Michael.

Message 4 of 5
Anonymous
in reply to: michael.horsler

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!

Message 5 of 5
Curtis_Waguespack
in reply to: Anonymous

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

 

 

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

Post to forums  

Autodesk Design & Make Report