Inventor General Discussion

Reply
Active Member
Kyle_of_Australia
Posts: 10
Registered: ‎01-10-2011
Message 21 of 33 (370 Views)

Re: Cannot suppress pattern element using ilogic

10-25-2012 06:09 PM in reply to: mrattray

SUCCESS! :smileyvery-happy:

 

Thanks very much Mike.

 

Hopefully this all will be useful to others in the future. If only the others at my work knew what went in to switching on and off this freakin' bracket!

 

-Kyle

Active Contributor
128848
Posts: 31
Registered: ‎01-16-2013
Message 22 of 33 (311 Views)

Re: Cannot suppress pattern element using ilogic

02-06-2013 08:21 AM in reply to: Kyle_of_Australia

Hi!

 

I'm using this code, and it works like a charm!

 

in some cases i suppress some parts in element 1. Is it possible to make a rule which suppresses the same parts in element 2, 3, etc when the part is suppressed in elemnt 1?

*Expert Elite*
mrattray
Posts: 2,471
Registered: ‎09-13-2011
Message 23 of 33 (309 Views)

Re: Cannot suppress pattern element using ilogic

02-06-2013 09:51 AM in reply to: 128848

I have a hot job right now, but try playing around with the attached code (ignore the "do not change" comments, those are for my co-workers) and see what it does for you. I can come back later and write something specifically tailored to your situation if you need it.

 

By the way, you shouldn't post a reply in an old thread posing a new question. It makes it harder for other forum users to find answers through the search function. Instead, you should have created a new thread with a link referencing back to this thread.

Mike (not Matt) Rattray

Active Contributor
128848
Posts: 31
Registered: ‎01-16-2013
Message 24 of 33 (290 Views)

Re: Cannot suppress pattern element using ilogic

02-07-2013 01:15 AM in reply to: mrattray

To be honest, this code is way beyond my knowledge in programing and iLogic. Is there any books you can recommend, like iLogic for dummies or something? :smileyhappy:

*Expert Elite*
mrattray
Posts: 2,471
Registered: ‎09-13-2011
Message 25 of 33 (282 Views)

Re: Cannot suppress pattern element using ilogic

02-07-2013 05:01 AM in reply to: 128848

Are you familiar with level of detail reps? I think your problem may be related to your patterned sub-assemblies toggling from your custom LOD to the master LOD, which happens when you work with parts lists. If this is the case, the code I posted in the last reply should help you as is. Try adding it as a rule and see what it does for you. Just edit the LODname = "Custom" line to whatever name you're setting your LODs to (or don't).

I keep this rule in the root of my project's work directory and call it as an external rule in my assembly template.

Mike (not Matt) Rattray

Active Contributor
128848
Posts: 31
Registered: ‎01-16-2013
Message 26 of 33 (276 Views)

Re: Cannot suppress pattern element using ilogic

02-07-2013 06:20 AM in reply to: mrattray

Yes, I`m familiar with LOD.

 

All the sub assemblies are in a LevelofDetail01, so this is working. I tried your code, and it only sets the lod to custom, which in my case doesn`t change anything.

 

The photos of my problem is attached.

 

My assembly consists of vertical posts which are lined up next to each other with a center distance. There is a total of 20 posts, and I have a parameter which is called No_of_posts. If i set no of post to 16, it will suppress 4 posts etc. The rails are connected to each post. If I have 15 posts, there will be 14 rails. The rails is suppressd automatically depending on the number of posts. So the rails which should be copied into a pattern is ready. I set the post to a maximum of 20 posts, then all the rails which should be copied is active. I make a pattern with a total of 9 rails. By using the code Curtis supplied, I have a parameter called "Number_of_rails". When I enter 3 rails, the other 6 is suppressed.

 

Now, when the number of posts change, the number of rails will also change. If I for instance set no of post to 15, the rails which shouldnt be there is suppressed in element 1, but not in the other elements.

 

Hopefully my explanation was good enough :smileyhappy:

 

Edited by
Discussion_Admin

Active Contributor
128848
Posts: 31
Registered: ‎01-16-2013
Message 27 of 33 (269 Views)

Re: Cannot suppress pattern element using ilogic

02-07-2013 06:37 AM in reply to: 128848

I just realised. If No of rails is set to 1, then I make all the changes to the model, ie set number of posts, distances etc, and then set no of rails , the pattern will be correct. so it looks like all that is needed is to update the pattern. Anyone got a code for this? :smileyhappy:

*Expert Elite*
mrattray
Posts: 2,471
Registered: ‎09-13-2011
Message 28 of 33 (261 Views)

Re: Cannot suppress pattern element using ilogic

02-07-2013 08:04 AM in reply to: 128848

Does simply updating the model using the update button work?

Mike (not Matt) Rattray

Active Contributor
128848
Posts: 31
Registered: ‎01-16-2013
Message 29 of 33 (258 Views)

Re: Cannot suppress pattern element using ilogic

02-07-2013 08:20 AM in reply to: mrattray

No. My guess is that the pattern does not realise that the pattern has changed, so in the Inventors understanding there is nothing that needs to be updated.

*Expert Elite*
mrattray
Posts: 2,471
Registered: ‎09-13-2011
Message 30 of 33 (255 Views)

Re: Cannot suppress pattern element using ilogic

02-07-2013 08:22 AM in reply to: 128848

Can you post the actual model files?

Mike (not Matt) Rattray

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube