Reading Drawing Revision with GRIP?
Reading Drawing Revision with GRIP?
(OP)
Is there any way to grab the Drawing Revision show in the attached pic to a variable in GRIP?
Thanks for any help.
Thanks for any help.
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
Reading Drawing Revision with GRIP?
|
RE: Reading Drawing Revision with GRIP?
That being said, it might be better to use a Journal for something like this.
John R. Baker, P.E. (ret)
EX-Product 'Evangelist'
Irvine, CA
Siemens PLM:
UG/NX Museum:
The secret of life is not finding someone to live with
It's finding someone you can't live without
RE: Reading Drawing Revision with GRIP?
RE: Reading Drawing Revision with GRIP?
A journal program may be able to retrieve it and less trouble than Ufunc to create.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: Reading Drawing Revision with GRIP?
CODE
Option Strict Off Imports System Imports System.Collections.Generic Imports NXOpen Imports NXOpen.UF Module Module2 Dim theSession As Session = Session.GetSession() Dim theUfSession As UFSession = UFSession.GetUFSession() Dim theUI As UI = UI.GetUI() Dim lw As ListingWindow = theSession.ListingWindow Sub Main() Dim markId1 As Session.UndoMarkId markId1 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "NXJ") lw.Open() Dim dwgSheets As New List(Of Drawings.DrawingSheet) For Each temp As Drawings.DrawingSheet In theSession.Parts.Work.DrawingSheets dwgSheets.Add(temp) Next For Each temp As Drawings.DrawingSheet In dwgSheets lw.WriteLine("sheet name: " & temp.Name) Dim sheetNum As Integer Dim sheetRev As String Dim theSheetBuilder As Drawings.DrawingSheetBuilder = theSession.Parts.Work.DrawingSheets.DrawingSheetBuilder(temp) sheetNum = theSheetBuilder.Number sheetRev = theSheetBuilder.Revision theSheetBuilder.Destroy() lw.WriteLine(" sheet number: " & sheetNum.ToString) lw.WriteLine(" sheet revision: " & sheetRev) lw.WriteLine("") Next ' Roll back to avoid marking the part as Modified theSession.UndoToMark(markId1, "NXJ") theSession.DeleteUndoMark(markId1, "NXJ") lw.Close() End Sub Public Function GetUnloadOption(ByVal dummy As String) As Integer 'Unloads the image immediately after execution within NX GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately End Function End Modulewww.nxjournaling.com
RE: Reading Drawing Revision with GRIP?