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:

Finding Line Length


Recommended Posts

Hello All, I am creating a program that I need to report the length of a series of lines. I am using the SelectionManagerExample as a test bed. I have  it working for line selection as evidenced by the output of this:

Dim line = UtilityService.AskForLineGeometry()
                DialogManager.OK(CType(IIf(Not line Is Nothing, ApplicationStrings.SelectedLine, ApplicationStrings.NothingSelected), String), ApplicationStrings.SelectALine)
                Dim Level As Integer
                Level = line.Level
                MsgBox("Level of the selected Line is " & Level, vbOKOnly) -
Reports the correct level here proving I have a valid line

and the UtilityService.AskForLineGeometry is this:

Friend Function AskForLineGeometry() As LineGeometry
        ' Cast the return Geometry type to  an explicit LineGeometry, this is fine because we are masking on Line only
        Return TryCast(AskUser(ApplicationStrings.SelectALine, New GeometryMask(False, True, False, False, False, False, False, False)), LineGeometry)
    End Function

Looking at the Net-Hook API ref I see LineLength property in the index but it looks as if it is ONLY for the LeadInOutEntryExitParams. LineLength

Is there an easy way to report back the actual  length of the selected line? Seems that there is spline.length and not a line.length
 
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...