I logic code for linking flat pattern dimension to part list

I logic code for linking flat pattern dimension to part list

baliasM74U3
Advocate Advocate
531 Views
3 Replies
Message 1 of 4

I logic code for linking flat pattern dimension to part list

baliasM74U3
Advocate
Advocate

Hi Experts

 

Found the attached code from internet. How can I incorporate into one of the part and drawing I make.

 

Is it some thing like write a i logic rule > link it to parameters > all good ?

 

Will this work ?

0 Likes
532 Views
3 Replies
Replies (3)
Message 2 of 4

A.Acheson
Mentor
Mentor

@baliasM74U3 

 

The common element between the part and drawing would be a custom iproperty showing the size driven from the sheet metal extents, driven from parameters then concentated to show one iproperty. Could you please attach the code you would like to use?

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

baliasM74U3
Advocate
Advocate

baliasM74U3_0-1611453631594.png

 

0 Likes
Message 4 of 4

A.Acheson
Mentor
Mentor

@baliasM74U3 

 

Welcome to the forums and ilogic customization. For future ilogic post it would be best to use the customization forum. This will allow more eyes on your questions. 

Shown below is a fairly simple internal/external rule already created posted on the customization forum. A note the sheet metal extents will return units of cm so a conversion in the code would be needed. Or create a user parameter and put the sheet metal extents equal to the parameter and use the parameter unit conversion do the work.

https://forums.autodesk.com/t5/inventor-customization/ilogic-flat-pattern-extents-to-parameters/td-p...

Where to place the code.

You have two options

1st local in the part called internal rule 🪑  Advantages parameter update immediately and code can be less complicated. Disadvantages you now will have code in every part so make an error or need to change the rule it is now in every part created.

2nd Is the external rule 🧳it can be created in little more than a notepad . Advantages: The rule is disconnected from each part and is stored in one location. So if an update is needed not an issue. The same rule can be used in drawing, part or assembly if its contents are set to do so. Disadvantages the code can be a bit more complex. 

How to trigger the rule. You need an event trigger. So when a parameter changes the rule updates. Look 👀 in the ribbon for events trigger and familiarize yourself with its function.

Here is a video 🎞  of another similar code which might be good also to learn the techniques. It starts of setting the events trigger, your last step and will work through the codes functionality. 

https://knowledge.autodesk.com/support/inventor/learn-explore/caas/screencast/Main/Details/6737ef73-...

 

 

You can get the sheet metal extents without ilogic shown here. Simply type the functions directly into the iproperties.

 

 

http://help.autodesk.com/view/INVNTOR/2020/ENU/?guid=GUID-9ED64200-A0CA-4F27-A308-9BF7ADB22D06

 

Hope this helps

 

 

 

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes