Create Datum Plane Using Simple NX Application Programming (SNAP)
Create Datum Plane Using Simple NX Application Programming (SNAP)
(OP)
Until now, I used to GRIP for programming modeling in NX. Now I want to start using SNAP.
As I am new in SNAP, I can not create any Plane or Datum Plane with SNAP.
I am using NX 8.5
Can you help me?
Regards
As I am new in SNAP, I can not create any Plane or Datum Plane with SNAP.
I am using NX 8.5
Can you help me?
Regards





RE: Create Datum Plane Using Simple NX Application Programming (SNAP)
This is from the document "SNAP and NX Open for GRIP Users"
The GRIP PLANE command creates a plane object. Plane objects are infinite in extent, and do not form part of a body.
They are typically used as reference objects — for example a plane might be used for mirroring, or to specify the
location of a cross-section.
In SNAP, there are two corresponding objects: Snap.NX.DatumPlane, and Snap.Geom.Surface.Plane. A Datum Plane
serves roughly the same purpose as a plane object, but Datum Planes are features that are linked to their parent
objects. A Geom.Surface.Plane is a non-persistent object that is not stored in an NX model and exists only within a
SNAP program. In SNAP, each curve has a Plane property which gives the plane containing the curve (if the curve is
planar).
If you really want to create the same kind of object as the GRIP PLANE command, you should use the NX Open
function NXOpen.UF.UFModl.CreatePlane
Mark Rief
NX CAM Customer Success
Siemens PLM Software
RE: Create Datum Plane Using Simple NX Application Programming (SNAP)
Thank you for your reply.
To create a datum plane using GRIP, parallel to XY Plane (with 1 mm distance) it needs just to write
pl01 = PLANE/XYPLAN, 1
But in SNAP I am completely confused. I don't know how can I write it’s command.
Can you write this command here?
for example
PL01 = Snap.NX.DatumPlane(XYPLAN, 1)
or
PL01 = NXOpen.UF.UFModl.CreatePlane
Why SNAP is very confusing and complex? I think GRIP is better while it seems NX support SNAP more than GRIP.
RE: Create Datum Plane Using Simple NX Application Programming (SNAP)
Anyway, difficult or not, here is code to do what you want
' Create a Datum Plane feature with origin at (0,0,1), parallel to the XY plane
Dim p1 As NX.DatumPlane = Snap.Create.DatumPlane({0,0,1}, Orientation.Identity)
' Create a Geom plane normal to the vector {0,0,1} at distance = 1 from origin
Dim p2 As New Snap.Geom.Surface.Plane({0,0,1}, 1)
' Create a Geom plane with equation 0*x + 0*y + 1*z = 1
Dim p3 As New Snap.Geom.Surface.Plane(0,0,1,1)
The first one creates a Datum Plane feature. The second and third create temporary Geom.Surface.Plane objects. If you tell us what you're going to do with the plane, then we can help you decide which one you should use.
RE: Create Datum Plane Using Simple NX Application Programming (SNAP)
RE: Create Datum Plane Using Simple NX Application Programming (SNAP)
I have a new problem with SNAP
I want to create a circle that is tangent to tree lines with a code in SNAP.
I can not do it. I write my code here. Can anyone help me?
I am using NX 8.5.
Thank you
Option Explicit Off
Imports miniSnap, miniSnap.Create
Module SnapSample
Sub Main()
Dim pA1, pA2, pB1, pB2 As Position
PA1 = { 000 , 0 , 0}
PA2 = { 300 , 0 , 0}
Dim LinA As NX.Line = Line(pA1, pA2)
PB1 = { 000 , 150 , 0}
PB2 ={ 200 , 250 , 0}
Dim LinB As NX.Line = Line(pB1, pB2)
Dim LinC As NX.Line = Line(pA1, pB1)
End Sub
End Module