Show Feature Only When Material = PolyPropylene (I LOGIC)

Show Feature Only When Material = PolyPropylene (I LOGIC)

Anonymous
Not applicable
1,009 Views
14 Replies
Message 1 of 15

Show Feature Only When Material = PolyPropylene (I LOGIC)

Anonymous
Not applicable

Hi All,

 

New user to Inventor - Previous user of Solidedge & Solidworks.

 

If anyone could help me out with this I Logic code then that would be much appreciated.

 

I have got a certian feature i would like to show only when the material of the product is Polypropylene. Any other matieral the extrude feature needs to be suppressed.

 

I understand there needs to be an Elseif to follow, but not sure what exactly. Please could anyone add to my code so that this works?

 

iProperties.Material = ("Polypropylene") Then
Feature.IsActive("Extrusion3") = True

End If

Many thanks,

 

Callum

 

Weston-Super-Mare, UK

0 Likes
Accepted solutions (2)
1,010 Views
14 Replies
Replies (14)
Message 2 of 15

mcgyvr
Consultant
Consultant
Accepted solution

And reason you don't simply create this as an ipart? (called part configurations in Solidworks I believe)

Not sure what you are trying to accomplish but typically an ipart is used to create a series of "similar" parts (called members) all driven by one model file (called the ipart factory)

 

but here..

If iProperties.Material = ("Polypropylene") Then
Feature.IsActive("Extrusion3") = False
Else
Feature.IsActive("Extrusion3") = True
End If

 



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
Message 3 of 15

Anonymous
Not applicable
Hi mcgyvr,

thanks for your reply but i would like to keep this as one part rather than creating a number of members. Reason being this part will be used in a master assembly, of which i would like to make copies of over and over again and sometime i need to apply differently materials to this part once copied depending on the parent assembly specification. When the material chosen is polyprop then this feature were talking about needs to be active. Any other material the feature needs to be suppressed.

I was hoping this could be done in I Logic.

Your coding does not work.

THanks
0 Likes
Message 4 of 15

Jonathan.Landeros
Advocate
Advocate
Accepted solution

Iparts might be worth considering still.  It's concievable that you could end up with a lot of duplicate parts if the same template part gets copied over and over. 

 

Granted, I may not completely understand the endgame of your process, but it might be food for thought.

I was already working on a code snippet when mcgyvr beat me to the punch.  Smiley Happy 


But here's my sample

 

If iProperties.Material = ("Polypropylene") Then
Feature.IsActive("Suppress") = False
ElseIf iProperties.Material IsNot ("Suppress") Then
Feature.IsActive("Suppress") = True
End If

 

 

You might also want to set an event trigger to update the part when the material changes.

 

 

====================================================

It is possible to fly without motors, but not without knowledge and skill.
Wilbur Wright

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
0 Likes
Message 5 of 15

mcgyvr
Consultant
Consultant

@Anonymous wrote:
Hi mcgyvr,

Your coding does not work.

THanks

The code I posted works just fine..

I "assumed" you knew you needed to run this rule anytime the material is changed or set an event trigger on material change to run it automatically.. Guess you didn't

 

 

 

 



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
0 Likes
Message 6 of 15

Anonymous
Not applicable

Hi

 

Mcgyvr i apologise your code is absolutley fine, i did not realise you had to apply an event trigger until jonathan pointed this out. After all i did state in my initial post that i am new to inventor! But thank you.

 

Jonathan -  Thanks for your post in helping me understand this process further.

 

Many thanks all

0 Likes
Message 7 of 15

mcgyvr
Consultant
Consultant

Being that you are new you might want to look into iparts and iassemblies..

As stated already we don't know what you are really trying to accomplish but I would recommend "new users" stay away from more advanced stuff like ilogic until they determine that the built in functions of Inventor won't do it for them..

Just a suggestion.. 

But it sounds to me like you are making "similar" parts to be used in "similar" assemblies and ipart and iassemblies may be a perfectly acceptable solution for you and may save you some trouble down the road..



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
0 Likes
Message 8 of 15

Anonymous
Not applicable

Thanks for the reply.

 

I have been using iparts/iassemblies on alot of my components and they have worked very well. But the situation with this part is that i would like to include it in an assembly that is fully parametric and can be changed to any size height/width/depth. On some of the parts like this one where the dims are fully driven by the parent assembly i would like to put in a set of rules (for example one of the rules tells the component to place a hole in the middle when the width dim exceeds 1500mm). And this feature that im trying to unsuppress when the material is polyprop is just another rule as i would like the opportunity to change the material of the component when placed in the assembly.

 

Here is a post i was just writing which may explain where im trying to get to a little bit better.

 

 

 

 

I have recently started a new job with a company that has all of their drawings/assemblies in AutoCad 2d. They would now like everything in 3d.

 

They manufacture fume cupboards for schools, which a product range of about 5 or 6, all coming in about 4 different standard size variations.

 

I am trying to create parametric assemblies of these cupboards which are all driven by an invisible central block, so that all i have to do is change the size of the block and the assembly will re-size.

 

My aim is to create a fully parametric adjustable size master assembly of each product range - so that when a customer requires a cupboard in a specific size that is non standard i can copy the assembly to make a unique version and change the sizes using the invisible central block i mentioned. Obviously some of the dimensions of the individual parts that make up the assembly would have now changed to reflect the parametrics on the parent assembly and on some of the projects the materials of certian parts will need to change.

 

I have created a drawing with every part or sub assembly so that if there is a change in dimensions of material then i can simply open the related drawing and update it. This will then be published in PDF format to show a drawing of the affected part so this can be sent for manufacture as a bespoke part.

 

I hope this sort of makes sense!? Smiley Sad

0 Likes
Message 9 of 15

Curtis_Waguespack
Consultant
Consultant

HI callum3DX6P,

 

Welcome to the fourm. I just skimmed this converstation, but thought I'd point you to some resources that might be of interest.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis

 

Advanced iLogic: Code Encapsulation by Chad Salmela

http://au.autodesk.com/au-online/classes-on-demand/class-catalog/2013/product-design-suite/ma1936#ch...

Video (download)

PDF (download)

 

 


 

iParts vs iLogic

Why use iParts when you could use iLogic or even Derived Parts?

First, let’s make clear why you would choose to use iParts over iLogic. iParts are used when there are
limited numbers of members. With our tooth example we might have up to a dozen variations i.e.:
Material, Diameter, or Length. So it is fitting to use iParts.
iLogic is used when the number of members is unknown and you will be using rules to control other parts
whether they are iParts or not. Consider a part that has hundreds of possible variations. Go with iLogic.

 

Source: http://aucache.autodesk.com/au2012/sessionsFiles/2525/3336/handout_2525_MA-2525%20class_handout.pdf

Autodesk® Inventor® work flow for developing a top down manufacturing shop process

By Jeff Richlin & Jim Dumont 


EESignature

0 Likes
Message 10 of 15

gilsdorf_e
Collaborator
Collaborator
If there's an infinite number of members, just use custom iParts. That's the way we do it.
0 Likes
Message 11 of 15

Mark.Lancaster
Consultant
Consultant

@Anonymous

 

Based on your detail explanation..   You may want to consider looking at Inventor iCopy.    Not sure if its a perfect match for your requirements but some of the information you have provided would work for you.

 

With iCopy, you basically setup your parts, assembly, and drawing templates and define what you want to change.  Then create a design using your information.

 

 

However it does take time in getting it setup and working properly.  But just another option I wanted to add to this discussion.

Mark Lancaster


  &  Autodesk Services MarketPlace Provider


Autodesk Inventor Certified Professional & not an Autodesk Employee


Likes is much appreciated if the information I have shared is helpful to you and/or others


Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.

0 Likes
Message 12 of 15

Anonymous
Not applicable

Morning,

 

Thanks for everyones contributions i will have a look into them.

 

Can anyone recommend a suitable method of copying assemblies, that enables me to select a parent assembly to copy, and it takes all of the attached part/sub-assy/and related drawing files with it? I would also like the option to add a pre-fix or suffix to the part numbers?

 

Many thanks,

 

Callum

0 Likes
Message 13 of 15

Anonymous
Not applicable
Just found a nifty bit of software called Design Cloner:

http://www.mgfx.co.za/software/tools-for-inventor/

This seem to do the trick!
0 Likes
Message 14 of 15

Mark.Lancaster
Consultant
Consultant

@Anonymous

 

You may want to look at iLogic Copy Design.  Its already built into Inventor and will copy all the related stuff including drawings.

Mark Lancaster


  &  Autodesk Services MarketPlace Provider


Autodesk Inventor Certified Professional & not an Autodesk Employee


Likes is much appreciated if the information I have shared is helpful to you and/or others


Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.

0 Likes
Message 15 of 15

Anonymous
Not applicable
Hi Mark,

Yeah that is a possibility - the only downfall is that i have to manually select the drawing files, where as the Design Cloner brings up a list of all related drawings.

0 Likes