Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Journal - select start, end and center point of edge

Status
Not open for further replies.

MANox

Mechanical
Apr 2, 2007
130
Hello everybody,

I have one question - I think answer is no, but I must ask.
I must transform operation from start point to selected points.
Is is some function in NXOpen for select specific points of geometry (start point, end point or center point) in modeling or manufacturing.
I think about something like this:
pict_g7dsjj.jpg

I need only coordinates of these points. The rest is simple.

Best regards

Michał Nowak

NX9.0 & TC10
 
Replies continue below

Recommended for you

Are you talking about an interactive program (BlockStyler)?
The SpecifyPoint block has a property SnapPointTypesEnabled that allows you to limit the point selection to things like "Arc Center", "End point" etc.

Graham Inchley, Systems Developer, Sandvik Coromant. HP EliteBook 8760w, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP4 64bit
Testing: NX9.0.2.5
 
If you want a standalone dialog that lets the user specify a position, you can use NXOpen.UF.Ui.PointConstruct (as you discovered) or Snap.UI.Input.GetPosition.

To allow the user to specify a position on a larger dialog (that includes other items), use a BlockDialog or a BlockForm containing a SpecifyPoint block.
 
From the text in the first post, I get the impression that you want to select a curve or edge and return multiple points on the curve/edge (such as start point, midpoint, and end point). If this is the case, then yes, there are functions (AskCurveProps being one of them) that will return points on a curve/edge. If this is not what you want, please add some clarification as to what you are trying to do.

www.nxjournaling.com
 
Sorry for the confusion.
I've already done what I wanted to do.
I wanted to highlight some points of the model geometry and read their coordinates.
I did this using: ufs.Ui.PointConstruct (cue, base_method, pt_tag, base_pt, response).
I wrote that in my second post.
My code it's something like this:
Code:
Public ptsPoints As New List(Of Point)

.....

        If select_points("Select Points") = 0 Then
            MsgBox("Brak punktów docelowych")
            Exit Sub
        End If

.....
    Function select_points(ByVal cue As String) As Integer
        Dim base_pt As Double() = New Double(2) {}
        Dim response As Integer = 0
        Dim base_method As UFUi.PointBaseMethod = UFUi.PointBaseMethod.PointCenterPt
        Dim pt_tag As Tag
        Dim i As Integer = 0


        Do

            ufs.Ui.LockUgAccess(NXOpen.UF.UFConstants.UF_UI_FROM_CUSTOM)
            ufs.Ui.PointConstruct(cue, base_method, pt_tag, base_pt, response)
            ufs.Ui.UnlockUgAccess(NXOpen.UF.UFConstants.UF_UI_FROM_CUSTOM)
            Dim punkt3d1 As Point3d = New Point3d(base_pt(0), base_pt(1), base_pt(2))
            Dim punkt As Point
            punkt = workPart.Points.CreatePoint(punkt3d1)
            ptsPoints.Add(punkt)
            i = i + 1

        Loop While response = vbCancel

        ptsPoints.Remove(ptsPoints(ptsPoints.Count - 1))
        Return ptsPoints.Count

    End Function

Once again, sorry and thanks for your help

Best regards

Michał Nowak
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor