Cancel
Showing results for 
Search instead for 
Did you mean: 

SE Draft With import_file Utility

Pioneer
Pioneer

Hi all,

 

Is it possible to use the import_file utility to attach files under a SE draft dataset type? I haven't been able to get it to work, and I'm not sure if the problem is functionality or syntax of what I'm typing in.

 

Background: I've found that if you manually create an SE Draft Dataset under an item revision in the rich client with the named reference being a flat dwg file, attempting to open it from Solid Edge will trigger a translation to SE draft and allow saving as usual from there. This is one of the avenues I am exploring for migrating legacy dwg files. 

 

Any help is much appreciated.

 

-Aaron

10 REPLIES

Re: SE Draft With import_file Utility

Gears Phenom Gears Phenom
Gears Phenom

Aaron,

 

I'm not clear as to what you are attempting to do. Can you explain more about what type of files are being attached to the SE drafts? Are these flat file dwg's not SE files? And you want to import them into Teamcenter as SE drafts without doing it manually?

 

Jamie

Re: SE Draft With import_file Utility

Legend
Legend

Can you share a screenshot of the named references showing the dwg file - I want to see all the columns and their values.

 

Also, can you share the syntax you are using for import_file.

 

Do you get any errors?  A syslog?

 

Rich

Richard Bennett
PLM Consultant
Prospect PLM Ltd

Re: SE Draft With import_file Utility

Pioneer
Pioneer

Jamie/Rich

 

We have decided to move our engineers to Solid Edge 2d when maintaining any 2D CAD. This has several benefits, including the use of SEEC and the fact that it eliminates AutoCAD LT from our organization. 

 

What we're trying to accomplish is to bring in flat dwg files (about 20,000) with an accompanying pdf for each dwg. When there is a need to revise a specific dwg file, it will be converted to Solid Edge 2D and uploaded as a new item with the correct revision. If it never needs revised, it just lives in Teamcenter with its respective PDF file. 

 

A very easy way to do this would be to use ps_upload to create document item types, and then use import_file to attach the dwg and pdf files under a misc and dataset type, respectively. It works like a charm, and is very simple. The only downside is that in order to get that dwg translated and uploaded, our engineers would need to download the named reference from the misc dataset type, translate it outside teamcenter, and then upload as a new item. 

 

I discovered while doing some manual testing that if you attach a dwg to an item revision as an SE Draft dataset type, and attempt to open that dataset from Solid Edge, SE translates it to dft and prompts to upload like it is a new draft file. No need to pull it out of Teamcenter and bring it back in. I would very much prefer this, as it is a much smoother process.

 

The roadblock I hit is that I haven't been able to get it to work with SE draft dataset type. I get this error:

 

Error: input datasettype not defined in database

 

Here's the command I am using on some test data:

 

import_file -user=infodba -password=infodba -group=dba -i=Z:\testimport.xml

 

And here are a couple of the lines of import file:

 

-f="Z:\LVVD030S6126894 BASIC EAP.dwg" -d=700614_dwg/A -type=SE-draft -ref=MISC_BINARY -item=700614 -revision=A -ie=y
-f="Z:\LVVD030S6126894 BASIC EAP.pdf" -d=700614_pdf/A -type=PDF -ref=PDF_Reference -item=700614 -revision=A -ie=y

 

I'm open to any other suggestions on how to accomplish this as well.

 

Thanks,

-Aaron

Re: SE Draft With import_file Utility

Pioneer
Pioneer

Update:

Using this syntax, I got past the dataset type error:

-f="Z:\LVVD030S6126894 BASIC EAP.dwg" -d=700617_dwg/A -type="SE Draft" -ref=SE-draft -item=700617 -revision=A -ie=y
-f="Z:\LVVD030S6126894 BASIC EAP.pdf" -d=700617_pdf/A -type=PDF -ref=PDF_Reference -item=700617 -revision=A -ie=y

 

Now I am getting the following:

import_file Error: Unable to create the relation[IMAN_specification][48021]

Re: SE Draft With import_file Utility

Legend
Legend

If its unable to create the relation then is it a write access issue?  Have you set BYPASS=ON in the cmd window?

 

Or, is it because the file is on a mapped drive? Try moving the file locally.

 

Rich

Richard Bennett
PLM Consultant
Prospect PLM Ltd

Re: SE Draft With import_file Utility

Legend
Legend

Also, you havent specified the RelationType

 

import_file [-u=user-id {-p=password | -pf=password-file} -g=group]
-f=file-name | -i=file-name [-vb] [-log=file-name] -type=datasettype -d=dataset-name
-ref=named-reference [-de={n | e | a | r}] [-item=item-id | -itemkey=key-id]
[-itemRevUid=item-revision-uid]
[-relationType=relation-type] [-use_ds_attached_to_rev_only]
[-revision=item-rev-num] [-ie={n | y}] [-desc=string]
[-v=volume-name] [-h]

Richard Bennett
PLM Consultant
Prospect PLM Ltd

Re: SE Draft With import_file Utility

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom
This error indicates that you don't have write access to the Item Revision? It may be creating orphaned datasets. Check GTAC document 001-6397570.
https://solutions.industrysoftware.automation.siemens.com/view.php?sort=desc&q=001-6397570&file_type...

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4

Re: SE Draft With import_file Utility

Pioneer
Pioneer

Hi all,

 

I set bypass to on, and it loaded successfully. Without specifying relation type, it seems to use a default, which is fine for my application. Thanks to everyone for your help. 

 

-Aaron

Re: SE Draft With import_file Utility

Gears Phenom Gears Phenom
Gears Phenom

Glad it all worked. I wasn't able to ask earlier. What happens later when you have a dwg and a dft loaded into your named references? And the next time you make a revision it will always take the dwg along with it? I'd test this further to make sure it's not going to negatively impact SEEC.

 

Jamie