Hi all!
I want to get Loop lenght from Mesuare tool for top face in flat pattern.
I have found a method for MeasureTools.GetLoopLength in the VBA object browser, but I can use it for sketch only(((
I have tried to create sketch for top face, but I don't now what I need to do next for getting Loop lenght.
Can someone help me with this?
Thank you in advance!!
Try the following ilogic rule.
Dim oFace As Face = ThisApplication.CommandManager.Pick(15877, "Select Face") Dim oLength As Double = 0 Dim minParam As Double, maxParam As Double, curveLength As Double For Each oEdge As Object In oFace.Edges oEdge.Evaluator.GetParamExtents(minParam, maxParam) oEdge.Evaluator.GetLengthAtParam(minParam, maxParam, curveLength) oLength = oLength + curveLength Next MessageBox.Show(Round(oLength,3) & " cm")
I hope this helps with your work. Cheers
Sergio Daniel Suarez
Mechanical Designer
| Upwork Profile | LinkedIn
Thank you very much!!! It really works!!
Hi! Do you have to have the exact length of the external loop? Or, the flat pattern extent area would be sufficient? The extent area can be obtained easily using iLogic rule or custom iProperty.
Many thanks!
Hello!
I have a problem with this rule.
I changed it for automatic top face specifying in flat pattern and when I use Emboss Feature it makes another result now.
Dim oDoc As PartDocument = ThisApplication.ActiveDocument Dim oLength As Double = 0 Dim minParam As Double, maxParam As Double, curveLength As Double If oDoc.DocumentSubType.DocumentSubTypeID = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then Dim oDef As SheetMetalComponentDefinition = oDoc.ComponentDefinition If Not oDef.HasFlatPattern Then oDef.Unfold() End If Dim oFlatPattern As FlatPattern = oDef.FlatPattern Dim oFace As Face = oFlatPattern.TopFace For Each oEdge As Object In oFace.Edges oEdge.Evaluator.GetParamExtents(minParam, maxParam) oEdge.Evaluator.GetLengthAtParam(minParam, maxParam, curveLength) oLength = oLength + curveLength 'cm Next End If
On first screen - correct result with your rule, on second screen - wrong result with my rule
I can't understand. Can you help me?
Hello!
I need exact summary lenght of all edges on top face including internal pockets, edges of engraving etc.
Can't find what you're looking for? Ask the community or share your knowledge.