Cancel
Showing results for 
Search instead for 
Did you mean: 

How to create csys by using Excel data

Experimenter
Experimenter

Dear All,

i need to create a csys by using input method(Excel),i can able to import the points but i can't able to create the csys by using values(from Excel).could you please help on this.

 

Thanks

2 REPLIES

Re: How to create csys by using Excel data

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

you always use the ug_excel_read() command in the expressions to map the x,y,z value to a cell of the excel.

 

ug_excel_read (documentation)

Returns the value in a given cell, from a given spreadsheet. The Excel spreadsheet to be opened could be either from the native file system, or from the dataset file stored in the Teamcenter database. Example for managed Mode: Assuming your spreadsheet dataset in Teamcenter is saved as: 000118 (Item) |__ 000118/A (Item Revision) |___000118/A(Spreadsheet Dataset) Then use: ug_excel_read( "000118/A", "A1" ) will open this spreadsheet and read the cell A1. The string used to specify a cell can contain the worksheet along with the cell number by separating the two fields with an exclamation mark. For example: Sheet1!A1 If a sheet is not specified then the cell will be read from the active worksheet, which is generally determined by which sheet was visible when the spreadsheet was saved. Note: For dataset file stored in the Teamcenter database, the spreadsheet must be stored as a MSExcel or MSExcelX dataset. The dataset shall be attached to its containing item revision with an IMAN_specification relation. Up to one MSExcel or MSExcelX dataset can be attached.
Requires:
String: Specify a spreadsheet
String: Specify a cell
Returns:
Number: The value in a spreadsheet cell

 


Ruud van den Brand
Pre-sales NX CAD
cards PLM Solutions

Re: How to create csys by using Excel data

Siemens Phenom Siemens Phenom
Siemens Phenom

I would likely approach this by first creating an Offset CSYS, which will create six expressions (X,Y,Z positions and X,Y,Z axial rotations.)  Then, I would read in the values from Excel into these expressions.

 

ug_cell_read() is the best call for an individual cell. 

 

ug_read_list() or even ug_read_fixed_list() might also be an efficient way to streamline things (by consolidating the interaction with Excel to one round-trip, rather than six.)

 

Does that help?

Taylor Anderson
NX Product Manager, Knowledge Reuse and NX Design
Tel: +1 (602) 441-0683
taylor.anderson@siemens.com