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 workflow for suppressing / excluding components

34 REPLIES 34
SOLVED
Reply
Message 1 of 35
SteveX82
12039 Views, 34 Replies

iLogic workflow for suppressing / excluding components

I am working on an iLogic assembly configurator that manipulates several skeletal parts, and suppresses both standard and skeletal parts depending on the configuration.

 

I've been using the Component.IsActive function to suppress all omitted parts, which has prompted me to create a custom Level of Detail. This hasn't caused me much grief until I had completed ~10months of work when it was time for me to make my final assembly drawing and a parts list.

 

I am now running into several deal-breaking issues:

1) Suppressed parts insist on appearing on the Parts List.

2) Saving the assembly drawing reverts my assembly model to the "Master" LOD, which I never, ever, ever want to see again so long as I live.

 

Is there another workflow or technique that I should be using to turn off unwanted components in an assembly? I understand that LOD's are really intended to manage system resources, but Inventor users seem to be left with no other option to display a skeletal assembly in a certain configuration. What is the point of the Component.IsActive function if it doesn't update your assembly (at least so far as the Parts List is concerned)?

 

If I am left to deal with the nightmare that is the Inventor LOD, is there any way to set up the Parts List to reference the custom LOD?

 

Drawing View reps don't seem to be an option, as it looks like there is no way to automatically update the same custom view after the configuration has been made. The iAssembly Include/Exclude feature would handle part inclusion and BOM behavior nicely, but it won't fit into the rest of my iLogic and file management program.

 

Thanks for any suggestions you can provide,

Steve

34 REPLIES 34
Message 2 of 35
rjay75
in reply to: SteveX82

iLogic has to have a custom level of detail when suppressing parts. (Usually named <iLogic>). Edit the base view of the assembly in the drawing.

 

In the drawing view dialog there is an option of which level of detail to select. This will also control which BOM to use for the parts list.

 

Check and see what setting the file open options is set to. Level of Detail should be set to Last Active. (Tools > Application Options > File > File Open Options) To get it to stay on the custom LOD switch to it and immediately save. Make sure that's the last active LOD when closing the assembly.

 

While opening an assembly you can also pick options and select the level of detail it opens up to.

Message 3 of 35
SteveX82
in reply to: rjay75

Thanks for your quick reply, Rodney.

 

Unfortunately, the behavior that you describe is not how my assembly and drawing behave.

 

When you get a few free moments, please try the following example:

 

1) Throw two random parts into an assembly file, but place one of them twice (for a total of three parts).

2) Suppress the second instance of the duplicate part, and create a custom LOD. Save and close.

3) Create a drawing and place a base view of your assembly with the custom LOD active.

4) Place a "Parts only" parts list....you'll notice the quantity is incorrect for your duplicate part.

5) Save the idw.

6) Open the assembly back up, and you'll notice it has reverted to the "Master" LOD despite your application options settings and last-saved-as condition.

 

I'm hoping you notice some sort of mistake in my example workflow, or an alternative method of making things work properly. The reversion to the Master LOD isn't exactly a deal-breaker as I last described, but it seems to be a bug that will end up annoying the hell out of the designers down the hall.

 

Thanks again for your help,

Steve

Message 4 of 35
swalton
in reply to: SteveX82

LODs are designed to not change the count in the BOM. 

 

Would you want your count of screws to change when you suspressed all 10k in your assembly so you could fit that iam in 3 GB of ram?

 

My guess is that if you want to change the count of components in your BOM, you will have to delete them and save a copy of the new assembly or use iassemblies.  

Steve Walton
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Inventor 2023
Vault Professional 2023
Message 5 of 35
SteveX82
in reply to: swalton

If LOD's are designed to not play nicely with iLogic, then I feel Autodesk ought to develop an alternative. At the very least, they could provide us with a Component.Include function that behaves similarly to an iAssembly.

 

What I'm really looking to do with this Configurator is to have a pile of parts in one assembly, and use iLogic (and only iLogic) to resize the skeletal parts as necessary and suppress/exclude/turn off/whateveryouwanttocallit any unnnecssary parts. Manually deleting parts after iLogic is done isn't an option, as it may be desired to include those parts at a later date.

 

Consider this example: we write a bunch of iLogic code to design custom Quonset huts based on a bunch of formulas that are too complex and varied for an iAssembly table. No two huts are the same, but they can come with or without a standard-sized window on the front. Are you saying that there isn't a way to use iLogic to include/excluse a simple window after it has managed to design the rest of the building?

Message 6 of 35
swalton
in reply to: SteveX82

You are fighting the way LODs are intended to be used.  You want to use them for configuration managment.  They don't work for that purpose because they do not change the BOM (by design from AutoDesk). The only use for an LOD is to remove some components from the stack of stuff that IV has to calculate and display at each regeneration. 

 

It looks like if you want to change the BOM you get to use iAssemblies or adding/deleting the extra components from your assembly.

 

I figured that you would have the template assembly with all its ilogic rules and the "pile of components" stored on disk.  Your users would then copy the entire template assembly and all of its components to a new location on disk.  They would then run the configuration rules on the new assembly set.  The ilogic rules would delete or add components as requred by the code.  No issues with LODs and BOMs because you are not trying to supress stuff, you have removed it completely. 

 

 

 

Steve Walton
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Inventor 2023
Vault Professional 2023
Message 7 of 35
swordmaster
in reply to: SteveX82

Steve,

The behaviour you are describing is not normal, I use ilogic and LOD,s to suppress/unsuppress components and the parts list ALWAYS shows the correct component quantity.

 

Here is my workflow

open a new assembly

create a new level of detail (i name mine ilogic as standard but the name is not important)

place 3 instances of a component

create a ilogic rule to suppress instances based on a user parameter

if

suppress_component = 1 then

Component.IsActive

("0061-181410-001:1") = False

Component.IsActive

("0061-181410-001:2") = True

Component.IsActive

("0061-181410-001:3") = True

elseif

suppress_component = 2 then

Component.IsActive

("0061-181410-001:1") = False

Component.IsActive

("0061-181410-001:2") = False

Component.IsActive

("0061-181410-001:3") = True

elseif

suppress_component = 3 then

Component.IsActive

("0061-181410-001:1") = False

Component.IsActive

("0061-181410-001:2") = False

Component.IsActive

("0061-181410-001:3") = False

else

Component.IsActive

("0061-181410-001:1") = True

Component.IsActive

("0061-181410-001:2") = True

Component.IsActive

("0061-181410-001:3") = True

end if

 

so by changing the parameter value i can control how many instances are active

save and close the assembly

 

start a new idw

create a base view

browse to the assembly file

select the ilogic level of detail from the drawing view interface

place the view

create the "parts only" parts list

quantity shown is the number of active instances

save idw and close

open the assembly (it opens in the ilogic lod )

change parameter value triggering ilogic rule which changes the instance quantity

save and close

open the idw

the parts list has updated to the revised instance quantity.

 

As i said i do this all the time with no issues. One word of warning is not to have the assembly AND the drawing open at the same time........this causes problems.

 

I am using INVENTOR 2009

 

Inventor 2010 Certified Professional
Message 8 of 35
SteveX82
in reply to: swordmaster

Thanks agian to both of you for your replies.

 

I've noticed that there is a difference in how the Parts List is affected by either manually suppressing a component VS using iLogic Component.IsActive to do the same.

 

* If a component is manually suppressed (as in my example), the parts list and quantities are "incorrect" and reflect the Master LOD's Parts List.

* If iLogic is used to suppress a component (as in swordmaster's example), then the parts list and quantities are "correct" and reflect the active custom LOD.

* In both cases, the assembly undesirably (at least in my opinion) switches to the Master LOD after saving the drawing, closing the drawing, and reopening the assembly. This causes all of the unneeded suppressed components to appear on the designer's screen until I remind them to manually switch back to the iLogic LOD. This process is repeated every time the drawing is opened and saved, and I'd really prefer for the assembly to just stay the way it was last saved.

 

If Autodesk intends for LOD's to control visualization and system resources only, then why are Parts Lists affected by one suppression workflow and not the other? Is this inconsistency also intentional?

Message 9 of 35
Shawn_79
in reply to: SteveX82

The iLogic component.isActive also changes the BOM structure to REFERENCE which is what removes it from the BOM.  If you manually suppress a part you must first change the BOM structure to Reference for the BOM to be correct.

 

I have written two iLogic rules to help with this situation.  The first will perfrom the component.isActive = False to a selected item and the second reviews the assembly and checks for suppressed parts that do not have a Reference BOM structure and prompts the user to change them.  The first rule is shown below.  If you are interested in the second rule let me know and I will clean it up and post it.

 

 

'Suppress Selected Item

'Get currently selected component
Dim oOccurrence as ComponentOccurrence
Try
 oOccurrence = ThisDoc.Document.SelectSet.Item(1)
Catch
 MessageBox.Show("Please select a component before running this rule", "iLogic")
 Return
End Try
 
 'Set the selected item
oOccurrence = ThisApplication.ActiveDocument.SelectSet.Item(1)

Component.IsActive(oOccurrence.name) = False

 

You can also use ilogic code to set the current LOD.  We have noticed that Inventor will sometimes change to Master LOD (somewhat random, or at least I haven't picked up on the pattern yet.)

 

ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager.LevelofDetailRepresentations("iLogic").Activate

 

 

-Shawn

 

 

Message 10 of 35
Shawn_79
in reply to: Shawn_79

The attached text file contains a rule that will check the current model browser tree for the following conditions and prompt to fix them:

 

Suppressed parts with an BOM structure not equal to Reference

Active parts with a BOM structure of Reference

Parts with visibiltiy turned off

 

It also includes provisions to ignore certain browser names such as "SKEL".  Virtual parts are also ignored.

 

We use this with our iLogic configurator in order to make sure the BOM reflects the model state.

 

All outputs are written using the trace.writeline command see the following thread for details.

http://forums.autodesk.com/t5/Autodesk-Inventor/iLogic-Developing-and-debugging/m-p/2845670/highligh...

 

 

-Shawn

Message 11 of 35
SteveX82
in reply to: Shawn_79

Thank you for the code and input, Shawn.

 

Unfortunately, I've just discovered that this Visibility/BOMStructure workflow won't work for me either. When patterning a subassembly component, Inventor insists on creating the additional occurences at the "Master" View Rep regardless of the source component's view rep. They can each be manually changed back to the correct View Rep each time the pattern is altered, but this defeats the point of configuring the assembly with iLogic code.

 

Conversely, a custom LOD is "correctly" carried through all pattern occurences. Unfortunately, it goes a little too far and insists on needing a custom LOD at the top assembly level, even if the only component suppression is occuring at a subassembly level. With custom LOD's come a whole new set of drawing-related headaches.

 

It literally seems as though there is no "proper" way to use iLogic to turn off assembly components without manually correcting a myriad of problems afterwards. Are there plans to release a "Just show components the way I tell you to until I tell you otherwise" feature in IV2013?

Message 12 of 35
swordmaster
in reply to: SteveX82

"It literally seems as though there is no "proper" way to use iLogic to turn off assembly components without manually correcting a myriad of problems afterwards".

As previously stated i have absolutely no problems suppressing/unsuppressing assembly components with ilogic , I and my users use this functionality every day

Inventor 2010 Certified Professional
Message 13 of 35
Shawn_79
in reply to: SteveX82

It sounds like you are going through the same learning curve we hit about a year ago.  It took some experimenting and lots of research to properly use LOD and view reps.  The custom LOD is really the answer for iLogic/BOM issues.

 

All of our configurable models have a LOD called "iLogic" the drawings then reference that LOD for the drawing views.

 

Can you elaborate on the drawing issues you are experiencing?

 

-Shawn

Message 14 of 35
SteveX82
in reply to: Shawn_79

The biggest problem with LOD's is the inability to have an assembly and it's drawing open at the same time. There seems to be a conflict between the activated custom LOD of the assembly, and the Master LOD used in the drawing's BOM. If both are open at the same time, I'll get error messages that stop me from running any iLogic code or saving whichever document was opened last (ie, the ridiculousness that is the "dirty LOD"). I can't imagine that this is a case where Inventor "works as designed", and having only one document open at a time is not a proper solution.

 

Additionally, the assembly will revert back to the Master LOD every time the drawing is saved. I understand that a rule can be written to force the assembly back to the iLogic LOD each time it's opened, but I also view that as a workaround, not an actual solution.

 

Several reps from Autodesk have stated that LOD's were never intended to support component suppression / configurations with iLogic, and I've discovered the same with regards to View Reps. Are we pushing the limits of what iLogic was intended to do, or has Autodesk failed to fully consider that these "configured" assemblies would ultimately be used in assembly drawings?

Message 15 of 35
swordmaster
in reply to: SteveX82

I do agree that not being able to have a assembly that uses a custom LOD and its associated drawing open at the same time. My users have become accustomed to this limitation. To cut Autodesk a little slack LOD's were around long before they aquired Ilogic , so some compatability issues are understandable, however these should be fixed.

 

For me ilogic "saved" inventor , previously it was very difficult to program intelligent parametrically controlled models.The benefits far outweigh the problems

 

Regarding the assembly reverting back to the LOD , I have never had this issue. In Tools/Application options/Assembly I set the Default level of detail to "Last Active"

That way if the assembly is saved in the custom (ilogic) LOD it will open in that LOD

 

I am not a fan of having a rule to force the assembly to open in a particular LOD. Sometimes it is necessary to open the assembly in the Master LOD and having a rule just complicates matters.

I do not know if you use VAULT , if you do you must open the assembly in the Master LOD to upload files

Inventor 2010 Certified Professional
Tags (1)
Message 16 of 35
SteveX82
in reply to: swordmaster

We already have our file-opening option set to "Last Active". It seems that, when populating the BOM, Inventor opens the assembly / sets it to Master LOD / saves the assembly in the background.  Therefore, the assembly opens in the Master LOD when we next open it because it was technically the "Last Active" LOD.

 

Do you use Parts Lists in your assembly drawings? I never had a problem with undesirable asssembly LOD changes until I plopped down the parts list.

 

Our IT department is installing Vault in the next month or two, so I can only imagine the new list of obstacles that will present themselves. Thanks for the heads up about uploading assemblies in their Master LOD....this may be an issue for our planned workflow.

Message 17 of 35
swordmaster
in reply to: SteveX82

"We already have our file-opening option set to "Last Active". It seems that, when populating the BOM, Inventor opens the assembly / sets it to Master LOD / saves the assembly in the background.  Therefore, the assembly opens in the Master LOD when we next open it because it was technically the "Last Active" LOD"

 

Never experienced this behaviour, my assemblies always open in the last active LOD

 

Yes i use parts lists all the time and again the LOD does not change from the last active configuration

Inventor 2010 Certified Professional
Message 18 of 35
swalton
in reply to: SteveX82

Can you go into more detail about why you don't want to use iAssemblies?  Maybe there is a different way to use them to address your needs.

 

I thought I read that you expect vault to be up and running in a few weeks/months.  You might want to set up a test environment before you go live so you can see what effect vault will have on your automation process.

There is are a few limitations with Vault and iParts\iAssemblies: 

1. you can't move the factories or childern of iParts\iAssemblies from one directory to another in Vault.

2. if you make a change to the factory, you will need to checkout, update, and checkin all of the childern of the iParts\iAssemblies

 

I also wonder if the improved copy-design functionality in vault will allow you to make copies of your template assembly (and all drawings, etc), run your iLogic rules against the copy, delete the extra components, and open the copied drawings with the correct quanties.

 

Worth setting up a Vault ADMS on your workstation for testing in my mind.

 

Steve Walton
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Inventor 2023
Vault Professional 2023
Message 19 of 35
rjay75
in reply to: SteveX82

Hmm, we have several iLogic template assemblies that manipulate the configuration of designs by suppressing and unsuppressing components. Including components that may be suppressed and unsuppressed in different groups so their quantities will be different between different configuartions.

 

We primarily only have two issues occasionallly. If the assembly and the drawing is open at the same time occasionally there will be saving issues where the drawing is refencing the iLogic LOD but IV wants the assembly to be at master LOD to save. Not always though. Majority of the time it seems to save fine from the iLogic LOD. One thing we've discovered is that modifying the assembly while the drawing is upon is when this error mostly happens.

 

The other issue we occasionally have is while opening the drawing it will revert to the master LOD. But it's not to big of a deal and doesn't happen much. We are using the vault and don't seem to have to much of a problem opening files already at the iLogic LOD.

 

The biggest irritants with LOD seem to happen if you are editing the assembly and a drawing referencing it is open at the same time. Seems to loose which LOD is active and which one should be active.

Message 20 of 35
ChristinaForest
in reply to: SteveX82

many many worflow on here Smiley Frustrated

I try many but nothing work for me 😞

I have parameters "TR" in my master sketch "B SKETCH"

but not abble to see this parameter? or it's my rule how have a problem???

 

Sorry for my horrible english 😞  and thanks for your help 🙂

 

levelofdetail.PNG

 

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

Post to forums  

Autodesk Design & Make Report