Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Is there a way to get Material size (WxLxH) by using iLogic?

FacebookGroupMember

Is there a way to get Material size (WxLxH) by using iLogic?

FacebookGroupMember
Not applicable
Is there a way to get Material size (WxLxH) by using iLogic?
0 Likes
Reply
1,014 Views
14 Replies
Replies (14)

FacebookGroupMember
Not applicable
What do you mean?for what purpose? You can get it in ilogic by naming dimensions etc? And ilogic can pull it from there
0 Likes

FacebookGroupMember
Not applicable
For sheet metal you can calculate bounding box for sheet usage but I would search for something like bounding box calculation for inventor parts?
0 Likes

FacebookGroupMember
Not applicable
We need the material size (W x L x H) or (Dia x L) to be automatic updated and shown on idw (title block) for our machine shop.
0 Likes

FacebookGroupMember
Not applicable
Philip Jintes You can rename the Parameters in the model, export them (tick box within the Parameters window) and then pull them through on the drawing either manually or using iLogic.
0 Likes

FacebookGroupMember
Not applicable
Create the named parameters in a template, set them to export and use iproperty "stock number" to create your material reference. Add "stock number" to your drawing template

https://www.cadlinecommunity.co.uk/hc/en-us/articles/360015106038-Inventor-Parameter-driven-iPropert...
0 Likes

FacebookGroupMember
Not applicable
Dan Goodrich Perfect solution :ok_hand:
0 Likes

FacebookGroupMember
Not applicable
Tnx for the replies, i will check tomorrow what works for me...
0 Likes

FacebookGroupMember
Not applicable
Yes, this can be done easily in iLogic. Go to Snippets-Measure-ExtentsLength, Width, and Height.
0 Likes

FacebookGroupMember
Not applicable
Another approach is to use OrientedBox properties in API. Here is some discussion. https://forums.autodesk.com/t5/inventor-ideas/overall-bounding-box-size-of-part-or-assembly/idi-p/67...
0 Likes

FacebookGroupMember
Not applicable
Johnson Shiue
I found the code below but the values come up as 0.

Dim oLength As Decimal
Dim oHeight As Decimal
Dim oWidth As Decimal
oLength = Round(Measure.ExtentsLength,2)
oHeight = Round(Measure.ExtentsHeight,2)
oWidth = Round(Measure.ExtentsWidth,2)
Dim SLength As String = oLength.ToString()
Dim SHeight As String = oHeight.ToString()
Dim SWidth As String = oWidth.ToString()
iProperties.Value("Custom", "Length") = SLength
iProperties.Value("Custom", "Height") = SHeight
iProperties.Value("Custom", "Width") = SWidth
0 Likes

FacebookGroupMember
Not applicable
Philip Jintes yes it’s possible we are doing that!
0 Likes

FacebookGroupMember
Not applicable
Daniel Cuperus would you like to share how you do it?
0 Likes

FacebookGroupMember
Not applicable
Dan Goodrich Good solution! But its not the automatic solution im looking for.
0 Likes

FacebookGroupMember
Not applicable
Yes you can do it with Range box using Inventor API and iLogic and Save them either to parameters or iProperties.

Use
RangeBox.MaxPoint and RangeBox.MinPoint methods to achieve the same.

I would also advise to google it as there is already a blog available.
0 Likes