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 to suppress the component occurence again

2 REPLIES 2
Reply
Message 1 of 3
martin.madaj
872 Views, 2 Replies

iLogic to suppress the component occurence again

Hello everybody,

 

I've been wandering through the forum to find some solution on suppressing the component occurrence in an assembly using the iLogic code but nothing that has been discussed seems to fit on my problem. Or I don't understand it well... I'll try to describe it.

 

1. I have a simple rectangular assembly consisting of a four bars. Size (length and width) of the assembly is driven from within the assembly using the iLogic code (therefore I modify the dimensions of the bars from the assembly level). I CAN CHANGE THE LENGTH AND WIDTH OF THE RECTANGULAR FRAME.

01.png

2. Inside the rectangular frame I have some inner bars (crosspieces) that are positioned from the left to the right so that the middle bar is always in the center of the longer side of the rectangular frame. Position, number and spacing of the crosspieces is also driven using the iLogic code to ensure that the inner bars are always evenly spaced and centered inside the rectangular frame. I CAN CHANGE THE SPACING (ROZTEC_OMEGA parameter) OF THE INNER BARS (SELECTION FROM 2 VALUES), OTHER DIMENSIONS ARE ADJUSTED AUTOMATICALLY.

 

02.png

3. If I change the dimensions of the rectangular frame or the spacing of the inner bars, the assembly is adjusted accordingly.

03a.png03b.png

4. And now the tricky part (at least for me...). I have another parameter called ROZTEC_VZV that can be set to 1 of 2 values. Based on this parameter and spacing of the inner bars (ROZTEC_OMEGA) I want selectively suppress some inner bars so it may look like in the pictures below... This also should be done using the iLogic.

 

04a.png

04b.png

04c.png

5. The problem is that when I change any parameter (for example the length or the spacing), it sometimes works and sometimes it pop-ups some nice error windows like in the picture below. It seems to me that Inventor somehow does not know about the parameter that has changed (or I don't know how to tell Inventor that the parameter has changed).

05.png

Below is the iLogic code I have created to achieve the desired functionality. I also attached the assembly to test its functionality.

ilogic01.png

ilogic02.png

 

I would greatly appreciate any help.

Martin

Tags (1)
2 REPLIES 2
Message 2 of 3
johnsonshiue
in reply to: martin.madaj

Hi! This is a very interesting find! I cannot explain the behavior but I suspect it has something to do with the timing. Maybe the occurrence to be suppressed is not yet available for the rule.

I change the suppression order so each case suppresses from the smaller numbered occurrence to larger numbered occurrence. After I make the change, the error does not seem to appear. Could you try it and see if you see the same thing?

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 3 of 3
martin.madaj
in reply to: johnsonshiue

Hi Johnson,

 

Thanks for the advice! Hope I understood it well... I switched the order of suppression to something like this:

 

Case 1660

oPattern.OccurrencePatternElements.Item(stredni_omega-3).Suppressed=True

oPattern.OccurrencePatternElements.Item(stredni_omega-2).Suppressed=True

oPattern.OccurrencePatternElements.Item(stredni_omega+2).Suppressed=True

oPattern.OccurrencePatternElements.Item(stredni_omega+3).Suppressed=True

 

The assembly behaviour is better but still I'm getting the error message. Maybe I should reset the pattern (turn all occurences ON) every time the Case come into an action...

Tags (1)

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

Post to forums  

Autodesk Design & Make Report