Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Using ilogic to suppress/unsuppress frame generated parts

paldous76
Explorer

Using ilogic to suppress/unsuppress frame generated parts

paldous76
Explorer
Explorer

I'm using ilogic to suppress/un suppress frame generated parts depending on frame length.

levels of detail are setup in top-level and frame models.

rule is as follows (the SS parts are the frame generated ones):

If SEG_SIZE < 1600 Then
	Component.IsActive("CLAD_02:1") = True
Component.IsActive("CLAD_10:1") = True
Component.IsActive("SS:42") = False
Component.IsActive("SS:41") = False
Component.IsActive("SS:40") = False

Else If SEG_SIZE > 1601 Then
Component.IsActive("CLAD_02:1") = False
Component.IsActive("CLAD_10:1") = False
Component.IsActive("SS:42") = True
Component.IsActive("SS:41") = True
Component.IsActive("SS:40") = True
END IF

InventorVb.DocumentUpdate()

The rule works finewhen the size is reduced, the frame parts become suppressed. The problem comes when I enlarge the value over 1601 I get the following error:

"Error in rule: Extra segment, in document: 601_FRM.iam

Component: The component named "SS:42" was not found."

 

It's like its suppressed it and now it can't see it to un suppress it!!!

0 Likes
Reply
1,301 Views
8 Replies
Replies (8)

Curtis_Waguespack
Consultant
Consultant

Hi @paldous76 .

 

I'm just guessing but is the frame base component being reduced in size so that the frame skeleton no longer includes the frame segment, or something along those lines?

 

It's difficult to guess further without sample files ,  or some screen captures to look at.

 

Also just as a tip, you can search and ask programming questions of this type on the Inventor Customization forum too:
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

 

paldous76
Explorer
Explorer

Hi @Curtis_Waguespack , thanks for responding to my post.

 

You are correct,  I have a rule which defines the frame parts to be suppressed when a parameter (SEG_SIZE) is below 1600mm, but are unsuppressed over 1601mm

 

When the model is reduced in size (by changing the length parameter), the parts suppress.  When I increase the length parameter to make SEG_SIZE greater than 1601mm, the parts won't unsuppress, instead, it gives an error stating they cannot be found?

 

Thanks for the tip, I will have a look there too.

0 Likes

Anonymous
Not applicable

The code you have here gives two results, one for <1600 and one for >1601.  But what is going on when the seize is 1600 and 1601?  

0 Likes

Curtis_Waguespack
Consultant
Consultant

Hi @paldous76 ,

 

I only took a brief look, but I noticed that the frame member names are not what is expected when those members are suppressed. I'm not sure if this is related to Frame Generator or something else, but this seems to be the issue.

 

Let's ask @MjDeck if he has a moment to take a look and tell us what is going here.

 

I've attached a stripped down version of the assembly here, and created a rule that toggles the suppression on/off for easy testing using the expected name to suppress and the unexpected name to unsuppress.

 

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

 

aaa.png

0 Likes

johnsonshiue
Community Manager
Community Manager

Hi Guys,

 

It looks like the frame member browser names had been renamed. Which is why it confuses the rule. Go to Productivity section -> use Rename Browser Nodes command to reset the name back.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes

Curtis_Waguespack
Consultant
Consultant

Hi @johnsonshiue ,

 

I do not see using 'Rename Browser Nodes' as a solution.

 

Typically we want to"stabilize" component names by renaming them, so that the ilogic rule can find them when the design has been copied. So with that in mind using the  'Rename Browser Nodes' tool is certain to upset the rules in this assembly so that the code can not find the components.

 

What is interesting to me is that when some of the components are suppressed they are assigned different names, but other components that have also been stabilized with the same name format, maintain their name when they are suppressed.

 

This can be seen in the following image where SS:38 and SS:39 are suppressed but maintain their name, but when SS:40, SS:41 and SS:42 are suppressed they are given new "internal" names that makes the ilogic rule loose track of them. When SS:40, SS:41 and SS:42 are suppressed, they have names that match their browser node.

 

I've never seen this before, but assume it has something to do with Frame Generator?

 

aaa.png

 

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

0 Likes

johnsonshiue
Community Manager
Community Manager

Hi Curtis,

 

I got better understanding now. I don't think this behavior is particular to Frame Gen. This is about how Inventor manages "names." The reason why I added double quotes is that names can mean different things in Inventor.

For this case, "SS" is the so-called Explicit name coming from the frame member part. I assume when the user created the members in the Frame Gen Placement dialog, he made the members SS. As a result, SS becomes the new Browser name in the member ipt files. There isn't anything wrong with that. You can do it with any part.

However, for LOD Suppress, Inventor needs to know the actual file name. As a result, the Explicit name or Browser name does not mean anything to LOD. Also, the Explicit names can be the same. You can have multiple ipt files with the same Explicit names but they are in different file names.

To make this case work, the user needs to capture the file names. Then, suppress the files instead of the Explicit names.

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes

BLA_fpineda
Enthusiast
Enthusiast

Workflow:

  • Select the members that you want to Suppress
     
  • Right click and Demote using the Frame Generator

fpineda79TEG_2-1617950001107.png

  • Save the Assembly with the name that you want.

fpineda79TEG_3-1617950116401.png

  • Go to iLogic Code
  • Suppress the SubAssembly (The name will be always the same regardless the length)

fpineda79TEG_4-1617950184563.png

  • That's it!

If works for you, check the Answer as Solved.

0 Likes