Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

NX Drafting Journal - Identify Location of Spline on Drawing Sheet 1

Status
Not open for further replies.

jmarkus

Mechanical
Jul 11, 2001
377
I have a journal that identifies the start and end point of a line, and checks to see if it is in a specific area on the drawing sheet bounded by X1(i),Y1(i) & X2(i),Y2(i) and then adds it to a collection:

Code:
Dim theLine As Line = CType(obj, Line)
' Check if both endpoints are within the specified region
If (theLine.startPoint.X >= X1(i) AndAlso theLine.startPoint.X <= X2(i) AndAlso theLine.startPoint.Y >= Y1(i) AndAlso theLine.startPoint.Y <= Y2(i)) AndAlso
	(theLine.endPoint.X >= X1(i) AndAlso theLine.endPoint.X <= X2(i) AndAlso theLine.endPoint.Y >= Y1(i) AndAlso theLine.endPoint.Y <= Y2(i)) Then
	DraftingObject.Add(theLine))
End If

I would like to do the same with splines, but they don't have explicit start and end points, and it is possible that the middle of the spline could fall inside the area even if the end points do not.

How can I do something similar with splines?

Thanks,
Jeff
 
Replies continue below

Recommended for you

Great idea! That works beautifully!

Code:
Dim theSpline As Spline = CType(obj, Spline)
' Check if bounding box is within the specified region
Dim bbox(5) As Double  
theUFSession.Modl.AskBoundingBox(theSpline.Tag, bbox)
If (bbox(0) >= X1(i) AndAlso bbox(3)<= X2(i) AndAlso bbox(1) >= Y1(i) AndAlso bbox(4) <= Y2(i)) Then
[indent]DraftingObject.Add(theSpline)[/indent]

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor