Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Prompt for user to select Lines


Recommended Posts

Hello all, After a computer crash I am being requested to recreate a net-hook to allow user to select a line from the MasterCAM display area. I have everything set up the way I want it but now I can not get the program to allow user to select the lines.

The code looks like this:

Module Selection_Tools

Friend Function AskForLineGeometry(SelectionNumber As Integer, Total As Integer) As LineGeometry
        '// Ask user to select a mastercam line
        Dim Message As String
        Dim Mask As GeometryMask

        Message = "Select Line # " & SelectionNumber & " of " & Total

        Mask = New GeometryMask(False, True, False, False, False, False, False, False)

        Return AskUser(Message, Mask)

    End Function

End Module

In the Main Run command I initialize the Selection_Tools module

and the actual call looks like this:

Dim Line As Mastercam.Curves.LineGeometry
        For i = 1 To TotalLines
            Me.Hide()
            Line = Selection_Tools.AskForLineGeometry(i, TotalLines)
            LineLength = Mastercam.Math.VectorManager.Distance(Line.EndPoint1, Line.EndPoint2)
        Next

When ran I get the user prompt i.e. Select line 1 of 10 but the mouse will not allow any geometry to be selected. If I click on the select prompt I can <esc> thru the for look but nothing can be selected on the screen.

image.png.d91b91078ba5fe2b5c937f2a75c8dab1.png

Any help on this would be greatly appriciated as I spent alot of time this weekend head scratching and I do not have much hair left to scratch out :)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...