×
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

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

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

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

(OP)
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…)

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

4. And done


i use nx 8.5

Can you help me ? thank you


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

(OP)
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 

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

(OP)
can you help me ? please

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