check component include/exclude

check component include/exclude

Anonymous
Not applicable
313 Views
3 Replies
Message 1 of 4

check component include/exclude

Anonymous
Not applicable
I need to be able to tell if a component is excluded or not in my assembly.

I have a variable set up as a component occurrence that cycles through each component, and would like to use a simple if:then statement to determin with each component whether it is excluded or not.

I'm guessing its a boolean somewhere? Anyone know?

thanks,
Jeremy Edited by: jknoll on Apr 23, 2009 2:28 PM
0 Likes
314 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

Use the iAssemblyTableRow.IsExcluded method and
pass in the occurrence.

 

In Inventor 2010, you can directly query
ComponentOccurrence.Excluded property to check the excluded state of an
occurrence in the active iAssembly row.

 

Sanjay-
0 Likes
Message 3 of 4

Anonymous
Not applicable
unfortunately I'm using 2008.

Will iAssemblyTableRow.IsExcluded check whether the table returns a value of "Excluded" or whether the part is currently excluded or not.

I have a macro that checks what value the table returns for each component in my assembly, "Include" or "Exclude". Then I need to include or exclude components based on those values. This assembly is used in multiple places and whether a component is included or excluded from use to use may not be consistent. +
My problem is if a component is excluded when i open the assy and the table returns an "Include" value I need to send the exclude command, I believe it is a toggle command in 2008, to un-exclude it. Likewise, if the component is excluded when I open and returns an "Exclude" value in the table I would not want to send the exclude command.

Sorry, I'm pretty new to VB so I dont know lots of things.

Thanks for the help
Jeremy
0 Likes
Message 4 of 4

Anonymous
Not applicable

I'm not sure I fully follow your question, but the
IsExcluded method returns the include/exclude status of an occurrence for a
particular row in the table (which may or may not be currently active in the
table).

 

Sanjay-
0 Likes