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 LittleInch on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing a Part File, Expressions issues

Status
Not open for further replies.

stephlouv

Mechanical
Joined
Sep 10, 2013
Messages
125
Location
BE
Hello all,

under NX8.0
We have a big datasheet under spreadsheet form that have to figure on some drawings.
This spreadsheet exist in nearly the same form on a xls file used by engineering team for some calculation and design parameters summary.

As it is impossible to directly import an excel file, i tried this tricks :

- In one hand, wrote a macro is this xlsm file that generate a .exp file containing all the variables with the correct syntax.

- On the other hand, a part, with only this spreadsheet in the drafting space.
Cells are populated by expressions and we "import" "part" this spreadsheet when needed.

But when I import this part in a new drafting file, then the expressions have a suffix '2 ou '3 added
And then, my exp file does not correspond for uptading the cells values.

Why these suffix are added, even if the expressions are not exist before de importation ?
How to solve that ?

I'am now trying the fucntion that read cell values but i don't like it as it create a permanant link to an excel file.

Thank you.

Stéphane
 
The system does not waste any time doing a match check to see if an expression name already exisits, it simply creates all imported expression using a 'hashed' name.

That being said, if you have a GRIP execute license, the attached program will rename all of the expressions in a Part file removing the 'hash' marks. Download the file and before attempting to open it change the file header name from .zipper to .zip and then extract the files. If you open the 'Rename_Exp.grs' file it includes a description of what the program does.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.
 
 http://files.engineering.com/getfile.aspx?folder=d93245ee-c0e9-47a6-bb77-bfc0c7b58b77&file=rename_exp.zipper
Thanks a lot for the grip file.
It is running but the message windows tells :
0 expressions Renamed
119 Duplicates Unchanged
And the expressions remain the same.

I'am in change of developping some master parts and automate some process like that.
They must be as much as possible user friendly, so executing a grip is fun but if we can do without, it's better.

I have two other idea to try to solve this problem.
- import the .exp file in my original spreadsheet file, doing a save as and import it afterward.
- define a new set of drawing template with this spreadsheet already imbedded.
 
Then it means that there are both hashed and unhashed expressions with the same basic 'name' (other than the hash marks). If that's the case, then that's why NX even added the 'hash' marks in the first place, BECAUSE there was a chance that there WOULD be duplicates and this is how the software avoided any conflicts.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.
 
The starting part is brand new empty file. How can my expressions already be there ?
In this part, after the import, when I list "all" expressions, i don't see other than mine followed with '0 or '1
Weird.
I'am home now, I'll try my other ideas tomorrow. They are easier.

PS : How to learn Grip language ?
 
I'll have to check out the program but it was working fine the last time I used it, but it has been a couple of years now.

As for learning GRIP, you're about 25 years too late. It still works, but it's basically unsupported.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top