Unwrap - Fx Parameter

Unwrap - Fx Parameter

ivanildo.b
Advocate Advocate
963 Views
9 Replies
Message 1 of 10

Unwrap - Fx Parameter

ivanildo.b
Advocate
Advocate

How to get automatic dimension in the Fx table?

When the dimensions of the model change fx is changed.

Do you have any rules in Ilogic or VB that automatically put in the fx table?

 03.05.0000.PNG

0 Likes
Accepted solutions (1)
964 Views
9 Replies
Replies (9)
Message 2 of 10

bradeneuropeArthur
Mentor
Mentor

I can not give you exact that.

I have an add in that creates a user parameter ie Length; Width and Thickness, but no dimension in the sketch.

would that help you?

bradeneuropeArthur_0-1633790765861.png

 

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 10

ivanildo.b
Advocate
Advocate

I'm trying another way.
Insert dimension to capture and use in the fx table?03.05.0001.PNG

0 Likes
Message 4 of 10

bradeneuropeArthur
Mentor
Mentor
I understood that yes. But the projecten loop is not always dimensionable!

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 5 of 10

Ralf_Krieg
Advisor
Advisor

Hello

 

Is there always only one Unwrap feature?

Is there always only one WorkSurface?

Is the unwrapped surface always a circle?

If so, you can use iLogic below to get the radius as parameter "radius". Add this rule to the event trigger "on model geometry change". Every time you change the model, the parameter will be updated.

This rule is for this one specific situation your screenshot shows.

Dim oPartDoc As PartDocument = ThisDoc.Document
Dim oUOM As UnitsOfMeasure = oPartDoc.UnitsOfMeasure
Dim oCompdef As PartComponentDefinition = oPartDoc.ComponentDefinition
Dim oWorkSurface As WorkSurface = oCompdef.WorkSurfaces.Item(1)
Dim oSurfaceBody As SurfaceBody = oWorkSurface.SurfaceBodies.Item(1)
Dim oEdge As Edge = oSurfaceBody.Edges.Item(1)
Dim oCircle As Circle = oEdge.Geometry
Dim dRadius As Double = oUOM.ConvertUnits(oCircle.Radius ,"cm",oUOM.LengthUnits)
Dim oParam As UserParameter
Try
	oCompdef.Parameters.UserParameters.Item("radius").Expression=dRadius & oUOM.LengthUnits	
Catch
	oCompdef.Parameters.UserParameters.AddByExpression("radius", dRadius, oUOM.LengthUnits )
End Try

 


R. Krieg
RKW Solutions
www.rkw-solutions.com
Message 6 of 10

ivanildo.b
Advocate
Advocate

Thanks for the attention!
I'm trying to understand your answer.
I took the test, I was doubted.
I'm sending a drawing to explain it better.
The result of the routine has to be radius 575 mm. Thank you for your attention! 03.05.0004.PNG03.05.0003.PNG

0 Likes
Message 7 of 10

Ralf_Krieg
Advisor
Advisor

Hello

 

In such a case it would be much more helpful to upload the ipt file. I think there are some dimensions missing (please see picture).

Questions.jpg

 

Anyway, when your parts are always a revolve, there could be an alternative way we can try.

Dim oApp As Inventor.Application=ThisApplication
Dim oPartDoc As PartDocument = ThisDoc.Document
Dim oUOM As UnitsOfMeasure = oPartDoc.UnitsOfMeasure
Dim oCompdef As PartComponentDefinition = oPartDoc.ComponentDefinition
Dim oWorkSurface As WorkSurface = oCompdef.WorkSurfaces.Item(1)
Dim oSurfaceBody As SurfaceBody = oWorkSurface.SurfaceBodies.Item(1)
Dim oEdge As Edge = oSurfaceBody.Edges.Item(1)
Dim dLoopLength As Double=oApp.MeasureTools.GetLoopLength(oEdge)
Dim dRadius As Double = oUOM.ConvertUnits(dLoopLength / 2 / System.Math.PI,"cm",oUOM.LengthUnits)

Dim oParam As UserParameter
Try
	oCompdef.Parameters.UserParameters.Item("diam").Expression=dRadius & oUOM.LengthUnits	
Catch
	oCompdef.Parameters.UserParameters.AddByExpression("diam", dRadius, oUOM.LengthUnits )
End Try

 


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes
Message 8 of 10

iva.btblan
Advocate
Advocate

R. Krieg
RKW Solutions GmbH
www.rkw-solutions.com

 

Total joy. Excellent! Wonderful! Problem solved!

What path should I take so that in the future I can solve a similar problem?

Thanks for your attention in helping me!!

 

Ivanildo

0 Likes
Message 9 of 10

Ralf_Krieg
Advisor
Advisor

Hello

 

As long as the unwrapped face is a circle, take the second scipt. The first isn't stable and would not use it anymore.


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes
Message 10 of 10

ivanildo.b
Advocate
Advocate
Accepted solution

Excellent! Thank you!

0 Likes