Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

PartFamily Template > NXOpen > VB.NET > open & read cells in the internal excelbook

Status
Not open for further replies.

lklo

Industrial
Nov 24, 2010
226
Hi -
In NX >
Does someone here know if it will be possible to read values from the cell's in the internal excelsheet, in a partfamily template.
I know how to read and write in a excel sheet in OS - but I do not know how to access the excelsheet in a partfamily template.
I'm using VB.NET....

lklo
 
Replies continue below

Recommended for you

Yes, it is possible. You need to extract the spreadsheet to query or modify it. This link has some code that looks at a spreadsheet controlled tabular note, but the workflow would be similar for the modeling or part family spreadsheet.

www.nxjournaling.com
 
Cowski - thank you so much for this...
In near future I´m gonna program a small too for authoring PTB files (used in routing environment).
My goal is to be able to create a PTB file in one shot , all info and data is stored in the family master part.
But seems to be possible, because NXOpen can extract the internal excel sheet by using:
I will give it a try...

But I need to find the spreadSheetTag
I will try find the syntax for that...

Code:
Dim tempFile As String = "C:\Temp\tempToDelete.xlsx"
Code:
spreadSheetTag = ?????
Code:
 Dim ssObj As NXObject
ssObj = Utilities.NXObjectManager.Get(spreadSheetTag)
Code:
 theUfSession.Xs.ExtractSpreadsheet(ssObj.Name, tempFile)

lklo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor