Background: We are doing a small migration of acquistion data into TC 11.4. The data was originally Solidworks, we've already migrated this to NX and imported the NX .prt files into TC (creating Items, revs, ugmaster datasets in the process).
I now have a few thousand PDF files on the OS that I need to import to these aformentioned item revs. I've been working with import_file and have been struggling with successfully using the -item=xxx -revision=xxx arguements. I am able to get the PDF files to import successfully if I use the itemRevUid=xxx arguement, but this doesn't seem like a viable option as I don't have (or know of) a simple way to get the UID for all of the target item revs for all the PDF files.
Currently have this structure:
xxxxxNeed PDF herexxxxx
Question: When using the below syntax, we are getting an error in the TC Cmd Prompt stating Error: Item already exists as if it is trying to create a new item, instead of adding the dataset into the existing revision. It will create an orphan dataset, but not attach the PDF to the rev. Shouldn't this syntax just tell the utility which item/rev to attach the relation to?
import_file -u=infodba -p=infodba -g=dba -f=dwg_revA.pdf -d=dwg_revA -type=PDF -ref=PDF_Reference -item=Part1 -revision=A -log=log.txt
I've also tried adding -relationType=IMAN_specification or manifestation with the same results.
import_file -u=infodba -p=infodba -g=dba -f=dwg_revA.pdf -d=dwg_revA -type=PDF -ref=PDF_Reference -relationType=IMAN_specification -item=Part1 -revision=A -log=log.txt
Is there any way to do what I'm looking to do without finding the Rev UID? If not, is there a way that I can easily find the Rev UID for a list of revisions (either in search results, or in a folder) without writing code?
Solved! Go to Solution.
Try with -ie=y
From the docs;
Specifies behavior if the item already exists.
Specifies that the dataset will not be added if the item already exists.
Specifies that the dataset may be added if the item already exists. If the item
exists, but the item revision does not, an item revision is created.
You may also want to take a look at the -use_ds_attached_to_rev_only option.
Sometimes, it pays to walk away and come back to something later. @jonathan_morris exactly what I was looking for, and it was right there. I don't know how I overlooked that every time I read that page.
Thanks for being the 2nd set of eyes I needed :)
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4