×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

This testingmotioncallback GTAC revised journal works only on TOP view

This testingmotioncallback GTAC revised journal works only on TOP view

This testingmotioncallback GTAC revised journal works only on TOP view

(OP)
Hi

Can someone help in make this journal for peaking rect screen coordinates
and not 3d screen coordinates

Thaniks in advanced

The revised GTAC code

Imports System
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.UI
Imports NXOpen.Utilities

Module testing_motion_callback_x4_DisplayOgpLine

Public s As Session = Session.GetSession()
Public ufs As UFSession = UFSession.GetUFSession()
Public lw As ListingWindow = s.ListingWindow

Dim screen_pos(2) As Double
dim firsCall As Boolean

Sub Main()

Dim message As String = "Testing Motion Callback"
'Dim screen_pos(2) As Double
Dim viewTag As Tag = s.Parts.Display.Views.WorkView.Tag
Dim response As Integer = 0
Dim motion_cb_data As System.IntPtr
Dim client_data As System.IntPtr = Nothing

ufs.UI.LockUGAccess(ufconstants.UF_UI_FROM_CUSTOM)

firsCall = True

ufs.Ui.SpecifyScreenPosition(message, AddressOf my_motion_cb, _
motion_cb_data, screen_pos, viewTag, response)

firsCall = False

ufs.Ui.SpecifyScreenPosition(message, AddressOf my_motion_cb, _
motion_cb_data, screen_pos, viewTag, response)

ufs.UI.UnLockUGAccess(ufconstants.UF_UI_FROM_CUSTOM)

End Sub

Public Sub my_motion_cb(ByVal current_pos() As Double, _
ByRef mtn_cb_data As UFUi.MotionCbData, _
ByVal client_data As System.IntPtr)

Dim x0y0() As Double ' = {1, 0, 0}
Dim x1y0() As Double
Dim x0y1() As Double
Dim x1y1() As Double

Dim theView As Tag = mtn_cb_data.view_tag

If firsCall Then
ufs.Disp.DisplayOgpLine(theView, current_pos, current_pos)
Else
x0y0 = screen_pos
x1y0 = { current_pos(0),screen_pos(1),current_pos(2)}
x0y1 = { screen_pos(0),current_pos(1),current_pos(2)}
x1y1 = current_pos

ufs.Disp.DisplayOgpLine(theView, x0y0, x1y0)
ufs.Disp.DisplayOgpLine(theView, x0y0, x0y1)
ufs.Disp.DisplayOgpLine(theView, x1y0, x1y1)
ufs.Disp.DisplayOgpLine(theView, x0y1, x1y1)
End If

End Sub

Public Function GetUnloadOption(ByVal dummy As String) As Integer

Return Session.LibraryUnloadOption.Immediately

End Function

End Module





Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources