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
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
RE: i need a journal such a way that it ask me for selecting the DATUM Plane
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
RE: i need a journal such a way that it ask me for selecting the DATUM Plane
RE: i need a journal such a way that it ask me for selecting the DATUM Plane
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
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