Ehaviv
Computer
- Jul 2, 2003
- 1,012
Hi
I want to use this journal to list part attributes that have 'reference text'
linked to theme. can someone help ? which nxopen function to use ?
I mean a 'reference text' that builded this way:
In drafting I open the Note Dialog and click the Insert Part Attribute icon and I select an attribute
and that create This <WRef1*0@Title1> on the dialog and the 'reference text' on the graphics window.
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Module show_part_user_attributes
Sub Main()
Dim s As Session = Session.GetSession()
Dim lw As ListingWindow = s.ListingWindow()
Dim ufs As UFSession = UFSession.GetUFSession()
Dim markId1 As Session.UndoMarkId
markId1 = s.SetUndoMark(Session.MarkVisibility.Visible, "Report Body Attributes")
lw.Open()
ufs.Ui.ExitListingWindow() ' Clear and close the window
Dim ndx As Integer
Dim attrInfo() As NXObject.AttributeInformation
Try
attrInfo = s.Parts.Work.GetUserAttributes()
For ndx = 0 To attrInfo.Length - 1
lw.WriteLine("Title = " & attrInfo(ndx).Title & " Value = " _
& attrInfo(ndx).StringValue & vbCrLf)
Next
Catch ex As Exception
MsgBox(ex.ToString(), MsgBoxStyle.Critical)
End Try
End Sub
Public Function GetUnloadOption(ByVal dummy As String) As Integer
GetUnloadOption = UFConstants.UF_UNLOAD_IMMEDIATELY
End Function
End Module
Thanks in advanced
I want to use this journal to list part attributes that have 'reference text'
linked to theme. can someone help ? which nxopen function to use ?
I mean a 'reference text' that builded this way:
In drafting I open the Note Dialog and click the Insert Part Attribute icon and I select an attribute
and that create This <WRef1*0@Title1> on the dialog and the 'reference text' on the graphics window.
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Module show_part_user_attributes
Sub Main()
Dim s As Session = Session.GetSession()
Dim lw As ListingWindow = s.ListingWindow()
Dim ufs As UFSession = UFSession.GetUFSession()
Dim markId1 As Session.UndoMarkId
markId1 = s.SetUndoMark(Session.MarkVisibility.Visible, "Report Body Attributes")
lw.Open()
ufs.Ui.ExitListingWindow() ' Clear and close the window
Dim ndx As Integer
Dim attrInfo() As NXObject.AttributeInformation
Try
attrInfo = s.Parts.Work.GetUserAttributes()
For ndx = 0 To attrInfo.Length - 1
lw.WriteLine("Title = " & attrInfo(ndx).Title & " Value = " _
& attrInfo(ndx).StringValue & vbCrLf)
Next
Catch ex As Exception
MsgBox(ex.ToString(), MsgBoxStyle.Critical)
End Try
End Sub
Public Function GetUnloadOption(ByVal dummy As String) As Integer
GetUnloadOption = UFConstants.UF_UNLOAD_IMMEDIATELY
End Function
End Module
Thanks in advanced