Workflow (or Workaround) for iLogic assemblies

Workflow (or Workaround) for iLogic assemblies

Shag_Bore
Advocate Advocate
1,142 Views
17 Replies
Message 1 of 18

Workflow (or Workaround) for iLogic assemblies

Shag_Bore
Advocate
Advocate

Hello,

 

I have created a simplified version of a standard box we fabricate. This box varies in height, width and depth, also divider qty's and spacing varies. I linked all the part parameters to top level assembly parameters, so the user can modify the box. The form works great, assembly updates accordingly parts suppress as required. 

 

This is where I am running into issues, suppressing parts requires a LOD, and every time something changes or gets added,  an error comes up, it doesn't seem like it affects anything, but working in a LOD makes things difficult, I forgot to take a screenshot of the BOM issue, but it is something along the lines of creating a parts list causes an error due to the BOM not saved in the assembly. Eventually the assembly gets saved, and then the drawing parts list does get saved also. 

error1.PNG

 

upon researching this error, I found this thread  and it basically states that LOD's shouldn't be used for assembly/product creation, it should only be used to open up large assemblies to save loading time. Which make sense. It also states that the user should just toggle the visibility of parts and update the BOM accordingly by filtering the view reps.

 

I don't think manipulating the BOM is correct as there is an option for human error. 

 

In the attached assembly, the user opens the form, inputs the desired dimensions, and inputs, based on that the assembly then suppresses the appropriate components. Again, this is a very simplified version, there are many more components in the actual assembly. I can change the suppression part in the rule to toggle visibility, but then the qty's would be off and have to be manually input or configured. 

 

Also this assembly is stored in a Templates folder, from there I use iLogic Design Copy and add the project number as a prefix and save to project location.  Doing this renames the parts, inside the rule, the parts are still referenced to the original "Template" file names and not the new prefixed project names, looking for ideas on how to be able to manage this aswell. 

 

Hopefully this makes sense, 

 

Thanks!

 

Sean 

Sean Farr
Product Designer at Teksign Inc.
Inventor 2016 SP1
Dell Precision 3660
i7-12700 @ 2.40GHz-4.90GHz
32GB DDR5 4400MHz RAM
NIVDIA RTX A2000 6GB
0 Likes
Accepted solutions (1)
1,143 Views
17 Replies
Replies (17)
Message 2 of 18

Frederick_Law
Mentor
Mentor

Instead of suppress, try Disable those parts.

There are 3 ways to remove components:

Invisible

Suppress

Disable

 

Consider upgrade to 2022 for Model State.

Message 3 of 18

A.Acheson
Mentor
Mentor

While just switching the visibility is a quick option it doesn't manage the BOM as you say leaving it all to be done in the partslist and view rep visibilty. I would think the easiest method would be to simply use ilogic to delete/add and constrain any items that are needed. This of course is much harder but it does allow for custom assemblies and will have the bom accurate and will be easy to detail with minimal views. 

 

The main thing with assemblies is to use the origin planes as much as possible for positioning. This will avoid proxy faces/edges etc which become a real pain to deal with inside sub assemblies. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 4 of 18

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Hi @Shag_Bore,

 

You're on the right path, with just a couple of small adjustments.

 

Re: LOD and iLogic

You can use LOD for assemblies with iLogic. It is a proper workflow.

 

The thing to know is you must create a custom LOD and have it active. Typically we just create a LOD called "iLOGIC LOD" or something similar and make sure it is active before running the rule, or you can have your code make sure it is set active, etc.  See this link for related info:

https://clintbrown.co.uk/2019/12/21/ilogic-avoiding-errors-with-lods/

 

Re: iLogic + Suppress + BOM

The iLogic IsActive function does more than just suppressing/un-suppressing a component. It actually sets the BOM structure to Reference also, so the BOM is updated and the QTYs are accurate.

 

When we suppress something manually (not using iLogic ) Inventor does not set the BOM structure and QTYs do not match the suppression states, and that is why people were suggesting that Suppress was not an assembly configuration tool.

 

Re: Template/component names in Code

In your template assembly, rename the components from DIVIDER:1 to something like DIVIDER1 or DIVIDER_1

 

Then update your code to match these names. This will "stabilize" the browser names and then when you do the copy design those component names will not get updated and will remain the same as they are in the code.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

Message 5 of 18

Shag_Bore
Advocate
Advocate

@A.Acheson wrote:

simply use ilogic to delete/add and constrain any items that are needed. 


I spent weeks searching for ways to do this, ilogic assembly, ilogic remove components, ilogic dynamic assembly...nothing, then I search for ilogic delete/add components and the first result is a video of exactly what I am looking for...it is a longish video, but it shows how to use iLogic and add or remove components based on user parameters. Unfortunately, I think the iLogic snippets were not implemented until 2019 release, and I am stuck with 2016. 

So a few options:

-I can try and figure out how to add/delete components using VB 

 -there are 6 variations of my box, I can create 6 separate "Template" assemblies, that I can still customize to size without having to suppress or delete components after using iLogic Design Copy

-use my current assembly, and once the box assembly is created, suppress the rule running the suppressions, change the LOD back to master and avoid all possible error popups. 

 

Also, I found out that in my "Template" version assembly, I should rename the components in the browser (stabilize), this will ensure my iLogic rules will stay unbroken after doing an iLogic Design Copy with prefix added. I didn't realize that browser names remained the same, only the actual .ipts and .iams would be affected. 

 

I know the simplest solution is to "just upgrade" , but that isn't possible right now,

 

Thanks for you replies!

 

Sean

Sean Farr
Product Designer at Teksign Inc.
Inventor 2016 SP1
Dell Precision 3660
i7-12700 @ 2.40GHz-4.90GHz
32GB DDR5 4400MHz RAM
NIVDIA RTX A2000 6GB
0 Likes
Message 6 of 18

Curtis_Waguespack
Consultant
Consultant

@Shag_Bore 

 

Another quick tip:

 

You can use a For Loop to do the suppression, using something like this:

 

Where:

  • 5 is the max number of Dividers in the assembly ( change this as needed)
  • i is a local variable that we change from 1 to 5 with each step of the loop
'SUPPRESS DIVIDERS BASED ON SELECTED USER INPUT 
For i = 1 To 5
	Component.IsActive("DIVIDER_" & i) = (DIVIDERS >= i)
Next
iLogicVb.UpdateWhenDone = True

 

Curtis_Waguespack_0-1690379982315.png

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

 

EESignature

Message 7 of 18

Curtis_Waguespack
Consultant
Consultant

@Shag_Bore wrote:

@A.Acheson wrote:

simply use ilogic to delete/add and constrain any items that are needed. 


I spent weeks searching for ways to do this


You are correct, this ability was introduced in Inventor 2019, so you will not have that in Inventor 2016

 

 

EESignature

Message 8 of 18

Shag_Bore
Advocate
Advocate

Hello @Curtis_Waguespack ,

 

You must have replied as I was typing mine up, 

 

Cool! it looks like I can still achieve my initial objective, I will have a look at the links you shared.

 

Thanks!

 

Sean

Sean Farr
Product Designer at Teksign Inc.
Inventor 2016 SP1
Dell Precision 3660
i7-12700 @ 2.40GHz-4.90GHz
32GB DDR5 4400MHz RAM
NIVDIA RTX A2000 6GB
0 Likes
Message 9 of 18

Shag_Bore
Advocate
Advocate

@Curtis_Waguespack wrote:

@Shag_Bore 

 

Another quick tip:

 

You can use a For Loop to do the suppression, using something like this:

 

Where:

  • 5 is the max number of Dividers in the assembly ( change this as needed)
  • i is a local variable that we change from 1 to 5 with each step of the loop
'SUPPRESS DIVIDERS BASED ON SELECTED USER INPUT 
For i = 1 To 5
	Component.IsActive("DIVIDER_" & i) = (DIVIDERS >= i)
Next
iLogicVb.UpdateWhenDone = True

 I am trying to understand how this works, as you probably saw in my assembly, my rule is very basic and repetitive, using the format of : 

 

If 'parameter = x' Then

Component.isactive = true or false

 

rinse and repeat for each component and each parameter option

 

I see how you set i to a range, then concatenate the component name but how does the suppression work, when the DIVIDERS parameter is set to say 2, how does the 3rd, 4th and 5th divider know to suppress without using true or false? noob question lol,

 

I have slightly altered this to work with divider sets, I renamed all the dividers to DIVIDER1A, DIVIDER1B, etc...

For i = 1 To 5
	Component.IsActive("DIVIDER" & i & "A" ) = (DIVIDERS >= i)
	Component.IsActive("DIVIDER" & i & "B" ) = (DIVIDERS >= i)
Next

 

this works awesome! 4 lines vs my 60 

Thanks!

Sean Farr
Product Designer at Teksign Inc.
Inventor 2016 SP1
Dell Precision 3660
i7-12700 @ 2.40GHz-4.90GHz
32GB DDR5 4400MHz RAM
NIVDIA RTX A2000 6GB
Message 10 of 18

Curtis_Waguespack
Consultant
Consultant

@Shag_Bore wrote:

 I am trying to understand how this works...

 

I see how you set i to a range, then concatenate the component name but how does the suppression work, when the DIVIDERS parameter is set to say 2, how does the 3rd, 4th and 5th divider know to suppress without using true or false? noob question lol,

 

For i = 1 To 5
	Component.IsActive("DIVIDER" & i & "A" ) = (DIVIDERS >= i)
	Component.IsActive("DIVIDER" & i & "B" ) = (DIVIDERS >= i)
Next

 


Hopefully this makes sense ( I'm not always the best at explaining this sort of thing 🤔

 

 

Component.IsActive expects a Boolean value ( true or false)  

(DIVIDERS >= i)  returns either true or false

So we just set the IsActive to always equal whatever (DIVIDERS >= i)  returns

 

As we loop through the range, (DIVIDERS >= i) is reevaluated with each loop because the variable i is incremented

 

So for example, if DIVIDERS is 3...

 

then for the first step of the loop, (DIVIDERS >= i) will return True because 3 is greater than 1, and therefore the IsActive function is set to True

 

The next time though the loop i = 2, so (DIVIDERS >= i) will still return True because DIVIDERS is greater than 2 

The next time though the loop i = 3, so (DIVIDERS >= i)  will still return True because DIVIDERS is equal to 3 

The next time though the loop i = 4, so (DIVIDERS >= i)  will now return False because DIVIDERS is less than 4

... and so on

 

 

EESignature

Message 11 of 18

Curtis_Waguespack
Consultant
Consultant

Also if it helps you could lay it out like this so that it is easier for you to read/make sense of. 

 

For i = 1 To 5
	Dim oSuppressState As Boolean = (DIVIDERS >= i)
	'msgbox(oSuppressState)
	Component.IsActive("DIVIDER" & i & "A" ) = oSuppressState
	Component.IsActive("DIVIDER" & i & "B" ) = oSuppressState
Next

 

EESignature

Message 12 of 18

Shag_Bore
Advocate
Advocate

This is perfect, makes sense now. Didn't interpret that (DIVIDERS >= i) = true of false

 

I have made the changes to the assembly with new rules and updated component names and it works great. 

 

Before I apply the changes to my main Template assembly, do you see any issues applying this method to assemblies that have frame generator parts? As long as I change the browser name of the frame members, it should work the same?

 

Thanks @Curtis_Waguespack 

Sean Farr
Product Designer at Teksign Inc.
Inventor 2016 SP1
Dell Precision 3660
i7-12700 @ 2.40GHz-4.90GHz
32GB DDR5 4400MHz RAM
NIVDIA RTX A2000 6GB
Message 13 of 18

Curtis_Waguespack
Consultant
Consultant

@Shag_Bore wrote:

... frame generator parts? As long as I change the browser name of the frame members, it should work the same?

 

 


I think this should work ok. Keep in mind FG parts will be in a subassembly, so the syntax will be a bit different. To get the correct code line you can find the part in the model tree of the iLogic editor, right click on it, and choose Capture Current State as shown, and it will extract a line of code for you, to show you the correct syntax.

 

Curtis_Waguespack_0-1690404181629.png

 

EESignature

Message 14 of 18

Shag_Bore
Advocate
Advocate

Hey @Curtis_Waguespack 

 

Before I mark this as solved, I noticed a few things happening while working with these boxes.

I have an assembly that requires two of these boxes. So step one, I used iLogic Design Copy twice to make two unique boxes. Made the required design changes to each. (suppressed some dividers). Then I placed each box assembly into the top level assembly. 

 

Item 1 - when I save and close the whole assembly, then reopen, any suppression done to the individual box assemblies become unsuppressed. I have to run the rule inside each box assembly to suppress the dividers again. The dividers are published custom profiles placed using frame generator. I found this rule here: that I can have run when I open the main assembly to run all the rules so the "re-suppression" is automated, but I am just curious as to why when I open the assembly, those parts become un-suppressed. 

 

Item 2 - I like my parts list sorted alphabetically by part number, then numbered accordingly. So once my assembly is done, I go into the assembly BOM, sort by part number, then press the item renumber button. After doing this and pressing the done button, I am prompted with a "Save Assembly Dialogue Box", so I press save and then any suppressed dividers in all the boxes become unsuppressed again. 

 

It is weird, no errors or design doctor issues appear, and only the frame generator parts become un-suppressed. There are clip parts (.ipt's) associated with each divider that I suppress also and they stay suppressed. 

 

Any ideas? 

 

Thanks! 

 

 

 

 

Sean Farr
Product Designer at Teksign Inc.
Inventor 2016 SP1
Dell Precision 3660
i7-12700 @ 2.40GHz-4.90GHz
32GB DDR5 4400MHz RAM
NIVDIA RTX A2000 6GB
0 Likes
Message 15 of 18

Curtis_Waguespack
Consultant
Consultant

Hi @Shag_Bore , This might be due to a limitation with LODs and Frame Generator.

 

I don't recall all the specifics of how it worked/didn't work in Inventor 2016, but @petestrycharske and I were looking at Frame Generator and Model States in Inventor 2023 ( model states being the new LODs) ... and we saw something similar in that the FG subassembly does not allow us to do what we can do with standard subassemblies.

 

Not sure that helps. But it'd probably be best to start a new thread to examine that. 

EESignature

Message 16 of 18

petestrycharske
Advisor
Advisor

@Shag_Bore., good afternoon!  I've been doing a bit of testing with the best ways to try and control Frame Generator assemblies with Model States.  As @Curtis_Waguespack, said, it seems there's a bit of a limitation with Model States and Frame Generator at the moment.  I'm hoping to knock out a video showing the limitation and post it to the forums this afternoon and see if I'm missing anything, or if we can get the developers to look into this situation.  I'll post a link to the other forum post when I get it knocked out.  Thanks for your patience and have a most blessed day!

 

Peace,
Pete

Just a guy on a couch...

Please give a kudos if helpful and mark as a solution if somehow I got it right.
Message 17 of 18

Shag_Bore
Advocate
Advocate

Thanks! @petestrycharske and @Curtis_Waguespack 

 

I am able to carry on using this info,

 

Have a good weekend!

Sean Farr
Product Designer at Teksign Inc.
Inventor 2016 SP1
Dell Precision 3660
i7-12700 @ 2.40GHz-4.90GHz
32GB DDR5 4400MHz RAM
NIVDIA RTX A2000 6GB
0 Likes
Message 18 of 18

petestrycharske
Advisor
Advisor

All,

 

Good afternoon again!  Here is a link to some of the experimentation with Model States controlling Frame Generator members and multiple frames.  Hope all is well and have a most blessed day!

Peace,
Pete

Just a guy on a couch...

Please give a kudos if helpful and mark as a solution if somehow I got it right.
0 Likes