iLogic to place Thickness into form

iLogic to place Thickness into form

GKPByDesign
Advocate Advocate
1,960 Views
6 Replies
Message 1 of 7

iLogic to place Thickness into form

GKPByDesign
Advocate
Advocate

I want to place the sheet thickness (main sheet thickness) in my form, but when I do this it is greyed out. Can someone help, I like to use the sheet metal thickness for all and any part, can someone help me create a rule to make this work, or to grab a custom parameter to fill in the " Thickness " value.

0 Likes
1,961 Views
6 Replies
Replies (6)
Message 2 of 7

bradeneuropeArthur
Mentor
Mentor

Could you upload your code you have that far.

Regards,

Autodesk Software: Inventor Professional 2018 | Vault Professional 2018 | Autocad Mechanical 2018
Programming Skills: Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Dimension Component! | Partlist Export! | Derive I-properties! | Vault Prompts Via API! | Vault Handbook/Manual!
Drawing Toggle Sheets! | Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 7

GKPByDesign
Advocate
Advocate

I don't have any code, no idea how to code, I was hoping someone could help me. I somewhat understand the idea with make a separate parameter to shift the sheet metal rule, but I need a hand

 

0 Likes
Message 4 of 7

bretrick30
Advocate
Advocate

The reason the Thickness parameter is greyed out (Read-Only) in your form is because it is driven by the sheet metal defaults.  It appears that even turning off the option to use thickness from rule in the sheet metal defaults doesn't change this.

 

To get around this and to have the ability to change the thickness in an iLogic Form, you will need to create a User Parameter (I called it "SheetThickness"), then create an iLogic rule and paste the code below.  Make sure you do not suppress the rule and it will run each time the parameter is changed and will change the Sheet Metal Thickness.  

 

I don't know what units you use (I use inches), since the Inventor API uses centimeters I needed to convert my parameter from inches to centimeters.  That part of the code is in bold.  You can change that for whatever conversion you like.

 

 

Dim oPartDoc As PartDocument
oPartDoc = ThisApplication.ActiveDocument

Dim oSheetMetalCompDef As SheetMetalComponentDefinition
oSheetMetalCompDef = oPartDoc.ComponentDefinition

oSheetMetalCompDef.UseSheetMetalStyleThickness = False

Dim oThicknessParam As Parameter
oThicknessParam = oSheetMetalCompDef.Thickness

oThicknessParam.Value = SheetThickness * 2.54 

oPartDoc.Update
Message 5 of 7

GKPByDesign
Advocate
Advocate

That's what I have done, and this way I don't need ani logic rule, thanks for the help 

0 Likes
Message 6 of 7

chandra.shekar.g
Autodesk Support
Autodesk Support

@GKPByDesign ,

 

If question is answered, click "Accept solution" on respective post.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 7 of 7

dgreatice
Collaborator
Collaborator

Just create user parameter for drive thickness sheetmetal.

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
0 Likes