×
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

Detailed view information thru NXOPEN
2

Detailed view information thru NXOPEN

Detailed view information thru NXOPEN

(OP)
Is there any function in NXOPEN that is used to get the Detailed View information like
Detailed View Parent, Label on parent etc. along with other related information.

We are using NX 7.5 & VS2008

RE: Detailed view information thru NXOPEN

2
Here's a quick example:

CODE

Option Strict Off Imports System Imports NXOpen Module Module1 Sub Main() Dim theSession As Session = Session.GetSession() Dim workPart As Part = theSession.Parts.Work Dim lw As ListingWindow = theSession.ListingWindow lw.Open() Dim dwgSheets() As Drawings.DrawingSheet Dim dwgViews() As Drawings.DraftingView dwgSheets = workPart.DrawingSheets.ToArray For Each dwgSheet As Drawings.DrawingSheet In dwgSheets dwgViews = dwgSheet.GetDraftingViews For Each dwgView As Drawings.DraftingView In dwgViews 'lw.WriteLine("View type: " & dwgView.GetType.ToString) If TypeOf (dwgView) Is Drawings.DetailView Then lw.WriteLine(dwgView.Name) lw.WriteLine("Located on: " & dwgSheet.Name) Dim detailViewBuilder1 As Drawings.DetailViewBuilder detailViewBuilder1 = workPart.DraftingViews.CreateDetailViewBuilder(dwgView) With detailViewBuilder1 lw.WriteLine("Parent View: " & .Parent.View.Value.Name) lw.WriteLine("Label on parent: " & .LabelOnParent.ToString) lw.WriteLine("Is associative: " & .Associative.ToString) lw.WriteLine("Scale: " & .Scale.Numerator & ":" & .Scale.Denominator) lw.WriteLine("Boundary point 1: " & .BoundaryPoint1.Coordinates.ToString) lw.WriteLine("Boundary point 2: " & .BoundaryPoint2.Coordinates.ToString) lw.WriteLine("Alignment method: " & .Origin.AlignmentMethod.ToString) End With lw.WriteLine("Rendering style: " & dwgView.RenderingStyle.ToString) lw.WriteLine("Is out of date?: " & dwgView.IsOutOfDate.ToString) lw.WriteLine("Is active for sketching?: " & dwgView.IsActiveForSketching) detailViewBuilder1.Destroy() End If Next lw.WriteLine("") Next End Sub 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

www.nxjournaling.com

RE: Detailed view information thru NXOPEN

(OP)
Thank you very much cowski, this is what we were looking for.

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