Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating text on face from X, Y, Z coordinates [NX 8.5 Journal]

Status
Not open for further replies.

lexus911

Automotive
Jan 18, 2018
13
Is it possible to place text in curve on a face that shows curse coordinate system ?

I create ~ 100 text in curve to the surface and I am trying a journal which will do the things in following sequence.

1. Find a x,y,z by show infomation of the curve( line, splile…)
1_hcmk0i.png

2. Chose the x,y,z coordinate has round, in my case is X 2500
3. Create text placement in face and curve
2_lj1pe4.png

4. And done
3_gbchmi.png


i use nx 8.5

Can you help me ? thank you
 
Replies continue below

Recommended for you

I have some code for list xyz but i dont know how to create text with parameter

Code:
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.Assemblies

Module Intersect1
    Sub Main()
        Dim theSession As Session = Session.GetSession()
        Dim workPart As Part = theSession.Parts.Work
        Dim lw As ListingWindow = theSession.ListingWindow
        Dim ufs As UFSession = UFSession.GetUFSession()
        lw.Open()
        Dim myVectors(-1) As TaggedObject
        If SelectVectors("Select Vectors", myVectors) = Selection.Response.Cancel Then
        Return
        End If
        Dim mybody As Body = Nothing
        Dim mystartpoint(2) As Double
        Dim myintersectpoint(2) As Double
        Dim myfaceparms(1) As Double
        Dim intersectdata1 As NXOpen.UF.UFCurve.IntersectInfo = Nothing
        Dim intersectfound1 As Integer = Nothing
        For Each tempVector As Line In myVectors
        lw.WriteLine("X "+tempVector.StartPoint.X.ToString)
	lw.WriteLine("Y "+tempVector.StartPoint.Y.ToString)
	lw.WriteLine("Z "+tempVector.StartPoint.Z.ToString)

 Next
    End Sub

    Function SelectVectors(ByVal prompt As String, ByRef selObj() As TaggedObject) As Selection.Response

        Dim theUI As UI = UI.GetUI
        Dim title As String = "Select Vectors"
        Dim includeFeatures As Boolean = False
        Dim keepHighlighted As Boolean = False
        Dim selAction As Selection.SelectionAction = Selection.SelectionAction.ClearAndEnableSpecific
        Dim scope As Selection.SelectionScope = Selection.SelectionScope.AnyInAssembly
        Dim selectionMask_array(0) As Selection.MaskTriple

        With selectionMask_array(0)
            .Type = UFConstants.UF_line_type
            .Subtype = 0
        End With

        Dim resp As Selection.Response = theUI.SelectionManager.SelectTaggedObjects(prompt, _
         title, scope, selAction, _
         includeFeatures, keepHighlighted, selectionMask_array, _
         selObj)
        If resp = Selection.Response.Ok Then
            Return Selection.Response.Ok
        Else
            Return Selection.Response.Cancel
        End If

    End Function
 

    Public Function GetUnloadOption(ByVal dummy As String) As Integer

        'Unloads the image when the NX session terminates
        GetUnloadOption = NXOpen.Session.LibraryUnloadOption.AtTermination

    End Function

End Module
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor