×
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

i need a journal such a way that it ask me for selecting the DATUM Plane

i need a journal such a way that it ask me for selecting the DATUM Plane

i need a journal such a way that it ask me for selecting the DATUM Plane

(OP)
Hi

I recorded a Journal but in that selecting the Datum plane was also automatic but I need the Journal to ask the user for selecting the Datum Plane

Thanks in advance

RE: i need a journal such a way that it ask me for selecting the DATUM Plane

Search this forum for "Journal Plane Selection". The first one contains what I think you are looking for.

RE: i need a journal such a way that it ask me for selecting the DATUM Plane

(OP)
Hi

I could not find it can you please send me the link for that post

Thanks

RE: i need a journal such a way that it ask me for selecting the DATUM Plane

(OP)
i want a journal such a way that it will ask for the user to select the Datuma plane and then it will start sketch in that datum plan

RE: i need a journal such a way that it ask me for selecting the DATUM Plane

(OP)
Hi

I got the code now can you please tell me how to put the user input datum plane in the below code line

Dim datumPlane1 As DatumPlane = CType(workPart.Datums.FindObject("DATUM_CSYS(0) XZ plane"), DatumPlane)

thanks

RE: i need a journal such a way that it ask me for selecting the DATUM Plane

I'm not very good at explaining these things but hopefully the code below will help. your line is hi-lited in yellow

Option Strict Off
Imports System
Imports System.Collections
Imports NXOpen
Imports NXOpen.UF

Module PointCloudTools2
Dim s As Session = Session.GetSession()
Dim ui As UI = UI.GetUI()
Dim ufs As UFSession = UFSession.GetUFSession()
Dim lw As ListingWindow = s.ListingWindow
Dim wp As Part = s.Parts.Work
Sub Main()
Dim response As Selection.Response = Nothing
Dim dplane1 As DatumPlane = Nothing
Dim lw As ListingWindow = s.ListingWindow

response = selectDatumPlane(dplane1)
If response = Selection.Response.Cancel Or response = Selection.Response.Back _
Then GoTo End1



Dim datumPlane1 As DatumPlane = dplane1

lw.Open
lw.WriteLine(datumPlane1.Layer.ToString)
lw.Close

End1:
End Sub
Function selectDatumPlane(ByRef object1 As DatumPlane) As Selection.Response
Dim selectionMask_array(0) As Selection.MaskTriple
selectionMask_array(0).Type = UFConstants.UF_datum_plane_type
selectionMask_array(0).Subtype = 0
selectionMask_array(0).SolidBodySubtype = 0
Dim cursor As Point3d = Nothing
Dim resp As Selection.Response = _
ui.SelectionManager.SelectTaggedObject("Datum Plane Selection", "Select a DatumPlane", _
Selection.SelectionScope.WorkPart, _
Selection.SelectionAction.ClearAndEnableSpecific, _
False, False, selectionMask_array, object1, cursor)
If resp = Selection.Response.ObjectSelected Or _
resp = Selection.Response.ObjectSelectedByName Then
Return Selection.Response.Ok
ElseIf resp = Selection.Response.Back Then
Return Selection.Response.Back
ElseIf resp = Selection.Response.Cancel Then
Return Selection.Response.Cancel
End If
End Function

End Module

RE: i need a journal such a way that it ask me for selecting the DATUM Plane

The "Getting Started with SNAP" guide has a section on this. Just search the document for "FindObject"

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