Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dimensions of a sheet metal part in an ipart

22 REPLIES 22
SOLVED
Reply
Message 1 of 23
gunter.stachon
2058 Views, 22 Replies

Dimensions of a sheet metal part in an ipart

I would like to query the dimensions of an ipart so that the values can be read in Excel.

The ipart varies in dimensions.

22 REPLIES 22
Message 2 of 23

Welcome Gunter in our community!
I prepared for you short movie.

Please let me know is this help you to resolve your problem?

 

 


Damian Lewczyk
Technical Support Specialist
Autodesk
Message 3 of 23

Hello Damian

 

Thanks for the video. But that's not exactly what we were looking for.
We know how to create and edit iparts.
What we didn't find out is how to read the dimensions of the unfold (limits width (Y) and length (X) ) in it.
 
We use Inventor Prof 2019
Message 4 of 23

Hi! The workflow to do that is not that straight forward. The extent (width and length) of a flat pattern is more like a property of the sheet metal part, as opposed to driving dimensions or driving parameters.

iPart table is for driving parameters to determine how each member should behave. As a result, the extent cannot be be shown there. Even if you added them to the table, the values would be static. Here is what you need to do.

1) Open the iPart factory file.

2) Go to iProperties -> Custom -> create a custom text property called FLAT_WIDTH or anything you want -> set its value to "= <FLAT PATTERN WIDTH>". Then do the same for LENGTH accordingly.

3) Generate each member.

Now FLAT_WIDTH and FLAT_LENGTH will be added to each iPart member.

Many thanks!
 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 5 of 23

Hi!

That's right, the workflow isn't straight forward.
We've tried what you suggested several times before.
But we always fail because the static values remain static. Also in the generated ipart this value does not change. At least not with Inventor 2019.
Why can't you just read this value (see screenshot)? It seems that this is a bug...

 

Anmerkung 2019-10-15 082535.png

Message 6 of 23

Hi Gunter,

 

It should work. I did double-check before I replied. There could be an issue that I was not aware or the properties were not set correctly. Please share an example exhibiting the behavior here or send it to me directly (johnson.shiue@autodesk.com).

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 7 of 23

Dear Gunter

As @johnsonshiue  wrote, it is not possible to add any variable to iPart table, which is driven value. You can use there only dimension or value which control size, appearance etc.

iPart table does not include tool which query and check the value of driven dimension.


Damian Lewczyk
Technical Support Specialist
Autodesk
Message 8 of 23

Are you sure about this?
We use the Excel spreadsheets to control and also to retrieve data (resulting measures) which is then used on the drawing in the spreadsheets.

Message 9 of 23

Hi @gunter.stachon 

 

I'm pretty sure you just need to add the custom iproperty(s) that is pulling the flat pattern extents, to the ipart table. 

 

See this similar post where I described this process for another user, you would do the same but look under the Custom tab in the iProperties list and add the flat pattern iproperties that you created and included the formulas in (  =<FLAT PATTERN WIDTH> and =<FLAT PATTERN LENGTH> )

 

https://forums.autodesk.com/t5/inventor-forum/title-block-not-filling-in-iproperties-properly/m-p/90...

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

Message 10 of 23

Dear @Curtis_Waguespack

I tried to use your idea, but it is one problem.

The values which you insert to StockNumber Column are dimension which controls some solid/sketch.

The values are not output which are calculated from the whole model using some function (in this case it is =<FLAT PATTERN WIDTH> and =<FLAT PATTERN LENGTH>)

If we want to use your method, we should know how the dimension which controls solid/sketch affects the flat pattern length and width. Using this knowledge we should create an equation and insert this equation to iPart Table.
Are you agree with me? 
If I'm wrong or don't know something, please correct me.

@johnsonshiue  what do you this about this? 

 


Damian Lewczyk
Technical Support Specialist
Autodesk
Message 11 of 23

Dear @gunter.stachon 

The solution to your issue is only iLogic.

You can create Rule which will be checking Widht and Length and insert to iPart Table.

I suggest creating another post in INVENTOR CUSTOMIZE FORUM.

Kind Regards.

 


Damian Lewczyk
Technical Support Specialist
Autodesk
Message 12 of 23


@damian.lewczyk wrote:

Dear @gunter.stachon 

The solution to your issue is only iLogic.

You can create Rule which will be checking Widht and Length and insert to iPart Table.

I suggest creating another post in INVENTOR CUSTOMIZE FORUM.

Kind Regards.

 


@damian.lewczyk @gunter.stachon ,

 

Unless I am just misunderstanding, there is no need to use iLogic for this, I'll try an provide a more clear example later.

Message 13 of 23


@damian.lewczyk wrote:

Dear @Curtis_Waguespack

I tried to use your idea, but it is one problem.

The values which you insert to StockNumber Column are dimension which controls some solid/sketch.

The values are not output which are calculated from the whole model using some function (in this case it is =<FLAT PATTERN WIDTH> and =<FLAT PATTERN LENGTH>)

If we want to use your method, we should know how the dimension which controls solid/sketch affects the flat pattern length and width. Using this knowledge we should create an equation and insert this equation to iPart Table.
Are you agree with me? 
If I'm wrong or don't know something, please correct me.

@johnsonshiue  what do you this about this? 

 


Hi @damian.lewczyk 

You seem to be confusing the goal of the other thread concerning Stock Number with this thread concerning flat pattern extents. I was in no way suggesting that using the stock number iproperty was part of the solution for this sheet metal question.

 

The stock number related question simply demonstrates the method to be used for getting the result in an iPart. 

 

As I mentioned, I'll provide an example when I have some time.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

Message 14 of 23

@damian.lewczyk @gunter.stachon ,

 

Okay so I was mistaken on this... I apologize for any confusion I might have caused.

 

It's a shame that this is not built in to Inventor by now 😐 , but here is an ilogic solution that will make this work the way it SHOULD work.

 

Also, here is an Idea post for the is improvement idea:

Flat Pattern Extents for iParts

 

First create 2 columns in the iPart table using the Other tab

aaa.png

 

 

Then create an iLogic rule aaa.png

 

Then paste in this code

'ipart column names to use
oWidth = "FP_Width"
oLength = "FP_Length"

Dim oParent As iPartFactory
oParent = ThisDoc.Document.ComponentDefinition.iPartFactory
Dim oRow As iPartTableRow
Dim oColumn As iPartTableColumn
Dim oCell As iPartTableCell
Dim i As Long

'look at each row in the ipart table
For i = 1 To oParent.TableRows.Count
	'set the member for that row active so we can get the extents
	iPart.ChangeRow("", oParent.TableRows.Item(i).MemberName)
	
	'get extents values
	sExtents1 = SheetMetal.FlatExtentsWidth
	sExtents2 = SheetMetal.FlatExtentsLength
	
	'get the Cell 
	oCell = oParent.TableRows.Item(i).Item(oWidth)
		'set the cell value
		oCell.Value = sExtents1
	'get the Cell 
	oCell = oParent.TableRows.Item(i).Item(oLength)
		'set the cell value
		oCell.Value = sExtents2

Next

Then run the rule, and it will set the extents in each member row

bbb.PNG

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

Message 15 of 23

Hi Guys,

 

Using iLogic rule with iPart/iAssembly is always tricky (too may 'I'). iPart/iAssembly should always be driven by the table. Any attempt to override the table using other means can be problematic.

For this case, you don't need to use iLogic rule, but it may not give you the formatting you like without iLogic (see attached simple sheet metal part). Activate each member and generate the member. You will see the iProperties are populated accordingly. However, the values are in internal unit "cm" as opposed to doc unit. In order to have meaningful formatting, you do need to use iLogic rule.

I don't think theses physical properties (flat pattern or mass prop) should be stored on the iPart/iAssembly table. It is because the physical properties are driven by the geometry, which is driven by the table. As I noted earlier, the table should always be the driver. iLogic sort of helps mitigate the situation by updating the table.

Like I said, this is not a trivial workflow. I don't think we have a good solution to this at the moment. It requires several workarounds just to make it work.

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 16 of 23

Hi @Curtis_Waguespack,

How can I export FP_Length & FP_Width so that I can include into BOM of assembly?
I would like to get the below result

iLimbani_0-1702925945692.png
many thanks

 

Message 17 of 23
johnsonshiue
in reply to: iLimbani

Hi! Are these iProperties in the iPart? You may need to edit iLogic rule and populate the two properties to custom iProperties.

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 18 of 23
iLimbani
in reply to: gunter.stachon

Hi @johnsonshiue. My Goal is to achieve entry for FP_Length & FP_Width in assembly BOM.  For that, I exported FP_Length & FP_Width using iLogic-1 (given below). It works perfectly, however, when I run @Curtis_Waguespack iLogic-2 gives error (COMMENTED). I am running his rule because I have added new line item in iPart member and I want to get values of FP_Length & FP_Width in iPart Table. Once we solve out this issue, we can have FP_Length & FP_Width values in assembly BOM

iLogic-1

Dim oPartDoc As Document
oPartDoc = ThisDoc.Document

If oPartDoc.DocumentType = kPartDocumentObject Then

    Dim oPartCompDef As PartComponentDefinition
    oPartCompDef = oPartDoc.ComponentDefinition

    Dim oParams As Parameters
    oParams = oPartCompDef.Parameters

    Dim oUserParams As UserParameters
    oUserParams = oParams.UserParameters

    Try
        Dim oFP_Width As Parameter
        oFP_Width = oUserParams.Item("FP_Width")
    Catch
        ' The user parameter "FP_Width" does not exist
        Dim extents_width As Double
        extents_width = SheetMetal.FlatExtentsWidth
        oUserParams.AddByExpression("FP_Width", extents_width, "mm")
    End Try
	
    Try
        Dim oFP_Length As Parameter
        oFP_Length = oUserParams.Item("FP_Length")
    Catch
        ' The user parameter "FP_Length" does not exist
        Dim extents_length As Double
        extents_length = SheetMetal.FlatExtentsLength
        oUserParams.AddByExpression("oFP_Length", extents_length, "mm")
    End Try

End If

Parameter.Param("FP_Height").ExposedAsProperty = True
Parameter.Param("FP_Length").ExposedAsProperty = True

Result of iLogic-1 (Working)

iLimbani_0-1703000658990.png


iLogic-2 (from @Curtis_Waguespack )

'ipart column names to use
oWidth = "FP_Width"
oLength = "FP_Length"

Dim oParent As iPartFactory
oParent = ThisDoc.Document.ComponentDefinition.iPartFactory
Dim oRow As iPartTableRow
Dim oColumn As iPartTableColumn
Dim oCell As iPartTableCell
Dim i As Long

'look at each row in the ipart table
For i = 1 To oParent.TableRows.Count
	'set the member for that row active so we can get the extents
	iPart.ChangeRow("", oParent.TableRows.Item(i).MemberName)
	
	'get extents values
	sExtents1 = SheetMetal.FlatExtentsWidth
	sExtents2 = SheetMetal.FlatExtentsLength
	
	'get the Cell 
	oCell = oParent.TableRows.Item(i).Item(oWidth) '/// GETTING ERROR HERE
		'set the cell value
		oCell.Value = sExtents1
	'get the Cell 
	oCell = oParent.TableRows.Item(i).Item(oLength) ''/// GETTING ERROR HERE
		'set the cell value
		oCell.Value = sExtents2

Next

 

Message 19 of 23
johnsonshiue
in reply to: iLimbani

Hi! I took a quick look at the rule. I think the column name might be wrong. "FP_Width" and "FP_Length" should be custom iProperties. I believe the actual column names are "FP_Width [Custom]" and "FP_Length [Custom]" respectively.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 20 of 23
iLimbani
in reply to: gunter.stachon

Hi @johnsonshiue , defining column name in iPart Table as "FP_Width [Custom]" and "FP_Length [Custom]" is working only if we do following.

New Ilogic -2 will look like,
- Delete the User parameter defined using iLogic - 1
- iLogic - 2 (from previous post)
- iLogic -1 (from previous post

Thank you so much

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report