Curve Length as Reference Parameters in Rectangular Pattern

Curve Length as Reference Parameters in Rectangular Pattern

kresh.bell
Collaborator Collaborator
524 Views
7 Replies
Message 1 of 8

Curve Length as Reference Parameters in Rectangular Pattern

kresh.bell
Collaborator
Collaborator

Hi,

I first tried to solve this problem on the general discussion forum, but I was instructed to try here anyway.

 

I have an adaptive part.

 

Does anyone know how I can use curve Length value from the Pattern feature for some other feature or as a linked value?

 

This value does not exist in Reference Parameters, nor is it in Model Parameters and User Parameters, but that curve length exists, the value is also displayed in gray.

 

Is it possible to use that length with iLogic?

 

curveL.jpg

0 Likes
525 Views
7 Replies
Replies (7)
Message 2 of 8

dalton98
Collaborator
Collaborator

Hello. I messed around with it for a bit and what I think your after is the X/Y 'DirectionEntity'. The problem however is the edge can be overridden if it is part of the pattern. In that case you will have half the value. So ideally you would need to create a separate sketch to pattern off of.

Dim oDoc As PartDocument = ThisDoc.Document
Dim oRPF As RectangularPatternFeature = _
oDoc.ComponentDefinition.Features.RectangularPatternFeatures(1)

Dim oEdge As Edge = oRPF.Definition.XDirectionEntity

oEdge.Evaluator.GetParamExtents(MinParam, MaxParam)

MessageBox.Show(MaxParam - MinParam)

 

 

0 Likes
Message 3 of 8

kresh.bell
Collaborator
Collaborator

Hi,

I didn't quite understand you, but when I run your iLogic I get this

iLogic rule 01.jpg

0 Likes
Message 4 of 8

dalton98
Collaborator
Collaborator

What is the Direction or 'Curve Length' based off of? I was assuming it was an Edge. It is some kind of GeometryIntent then since the other options dont have a 'Curve Length'

daltonparrish_1-1672249312302.png

 

Maybe try searching for its ObjectType

MessageBox.Show(oRPF.Definition.XDirectionEntity.Type.ToString)

 

0 Likes
Message 5 of 8

dalton98
Collaborator
Collaborator

Ok it would probably look something more like this

Dim oDoc As PartDocument = ThisDoc.Document
Dim oRPF As RectangularPatternFeature = _
oDoc.ComponentDefinition.Features.RectangularPatternFeatures(1)

Dim oPath As Path = oRPF.Definition.XDirectionEntity
Dim oLine As LineSegment = oPath(1).Curve

MessageBox.Show(ThisApplication.MeasureTools.GetMinimumDistance(oLine.StartPoint, oLine.EndPoint))

'oLine.Evaluator.GetParamExtents(MinParam, MaxParam)
'oLine.Evaluator.GetLengthAtParam(MinParam, MaxParam, oLength)
'MessageBox.Show(oLength)
0 Likes
Message 6 of 8

kresh.bell
Collaborator
Collaborator

Hi,

something is wrong

Most likely, I did not explain well.

I have an assembly that I use as a template for iCopy (see attch). Everything works ok. But I have a "quantity" parameter. The problem starts when I want to add to that assembly parts that I want to duplicate with the pattern feature.

 

0 Likes
Message 7 of 8

dalton98
Collaborator
Collaborator

We're still using Inventor 2022 so I cant view it. The length has to be based off something though, cant you just find that line/curve and dimension it to make a parameter then link that parameter value?

 

Sorry if I'm not understanding, havn't worked with iCopy before.

0 Likes
Message 8 of 8

t_fransman
Advocate
Advocate

This should automatically make a ref para. So you can use an equation to get the ... Qty Value. Above. Did you ever get an ilogic that actually works? Same problem or very similar here!

 

0 Likes