Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

variable sheet names in Journal

Status
Not open for further replies.

Lilu2Go

Mechanical
Joined
Apr 3, 2017
Messages
2
Location
AT
Hello @all!

I created a journal for exporting cgm files and execute this with run_journal.exe. Now, I have a problem with the names of the drawingsheets... sometimes they called "BLATT", or "DRAWING", or "SHT1". I couldn't find a solution to get this part varible for more than one name.

Dim drawingSheet1 As Drawings.DrawingSheet = CType(workPart.DrawingSheets.FindObject("BLATT"), Drawings.DrawingSheet)

Has anybody an idea? Thanks a lot!

 
 http://files.engineering.com/getfile.aspx?folder=8112bc96-a31e-470e-8225-6a76dbe1733f&file=Orginal_cgm_export.vb
Use the parts drawing sheets collector instead of .FindObject()

Code:
For Each sheet As NXOpen.Drawings.DrawingSheet In workPart.DrawingSheets
    MsgBox(sheet.Name)
Next
 
ok, it took a while, but eventuelly I got it working! Thank you!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top