I would like to query the dimensions of an ipart so that the values can be read in Excel.
The ipart varies in dimensions.
Solved! Go to Solution.
I would like to query the dimensions of an ipart so that the values can be read in Excel.
The ipart varies in dimensions.
Solved! Go to Solution.
Solved by iLimbani. Go to Solution.
Welcome Gunter in our community!
I prepared for you short movie.
Please let me know is this help you to resolve your problem?
Welcome Gunter in our community!
I prepared for you short movie.
Please let me know is this help you to resolve your problem?
Hello Damian
Hello Damian
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!
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!
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...
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...
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!
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!
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.
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.
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.
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.
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> )
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
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> )
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
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?
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?
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.
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 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.
@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.
@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?
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
@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?
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
@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
Then create an iLogic rule
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
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
@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
Then create an iLogic rule
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
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
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!
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!
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
many thanks
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
many thanks
Hi! Are these iProperties in the iPart? You may need to edit iLogic rule and populate the two properties to custom iProperties.
Many thanks!
Hi! Are these iProperties in the iPart? You may need to edit iLogic rule and populate the two properties to custom iProperties.
Many thanks!
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)
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
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)
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
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!
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!
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
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.