cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Document Load From File Attributes

jlittle
6-Contributor

Document Load From File Attributes

I have loaded thousands of documents using the Load From file functionality without problems. I am trying this approach again and am having problems getting the attributes to populate. I have attached a sample file and would appreciate any help. I get no error message in the shell window or in the log file, the object gets created, but attributes don't get populated.


Thanks,


James Little


8 REPLIES 8
BenLoosli
23-Emerald II
(To:jlittle)

What version and build of Windchill are you using?
What version of Office created the document?
Is the document in a .doc file or a .docx file.


Thank you,

Ben H. Loosli
USEC, INC.
jlittle
6-Contributor
(To:jlittle)

I appreciate the responses. It is good to be humbled sometimes. Classic example of, if you look at something long enough, it all looks correct. I had copied a script that generates the XML files for my input and somehow missed the End portion of the original script.

Thanks,

James Little
Corning Cable Systems
CAD Administrator
(817) 431-7678 - office
(817) 301-2274 - cell
Jeremiah 33:3 "Call to Me, and I will answer you, and show you great and mighty things, which you do not know."

James,

As part of Ben's questions suggest - are you creating WTDoc's with attached files or is this just "no content" objects?

Looking at your XML snippet it looks like you do not specify a path to the files to upload.
With the loadFromFiles imports we have done we also had a <csvendwtdocument> element after the last <csvibavalue>. Could that be the missing part?

Jorn
bellj
1-Newbie
(To:jlittle)

The only difference I see between your example and what I did three years ago is the <csvuser> tag is missing.

<csvbeginwtdocument handler="wt.doc.LoadDoc.beginCreateWTDocument">
<csvname>XXXXXXXXXXXX</csvname>
<csvtitle>((null))</csvtitle>
<csvnumber>YYYYYYYYYYY</csvnumber>
<csvtype>Document</csvtype>
<csvdescription></csvdescription>
<csvdepartment>ENG</csvdepartment>
<csvsavein>/Default/Molds/M06262</csvsavein>
<csvteamtemplate></csvteamtemplate>
<csvdomain></csvdomain>
<csvlifecycletemplate>Tool WorkOrder</csvlifecycletemplate>
<csvlifecyclestate>COMPLETED</csvlifecyclestate>
<csvtypedef>com.corning.ToolWorkOrder</csvtypedef>
<csvversion>1</csvversion>
<csviteration>2</csviteration>
<csvuser>wcadmin</csvuser>
</csvbeginwtdocument>


joe bell
CM Application Administrator

MikeLockwood
22-Sapphire I
(To:jlittle)

These code snippets are of course available from within Windchill, but are notorious for having typos, being out date, etc.

It would be great if there was a place on Planet PTC to stash all these after they've been corrected and proven, and possibly commented on.
[cid:image001.png@01CD94AB.1F6A6FC0]

Great idea Mike,

I think the Documents objects at the Planet PTC site could be used for just that.

I just started a minimal (or even measly) attempt for loadFromFiles here:
avillanueva
22-Sapphire I
(To:jlittle)

I am looking to improve my load processes. Server is Unix which introduces its own complexities but I have some colleagues who have refined this to a request process with their helpdesk. The wrinkle I have is with the Path value which refers to where to look for the primary content file. It appears to be relative not absolute. The last time I played with this I believe it wanted to look the loadFiles/content folder but its been a while.

This is a problem on Unix if the codebase is locked down and under IT control, understandably. I am simply look for a safe drop location for the server to pick up the files from, preferable one that is outside the installation directory.

With the loading I did a while back, here, I created a symbolic link to a temp "vault" location where the couple guys doing the exports out of the old system could throw them. We had to do this because we had quite a bit of data being loaded and didn't want it all in the install directory.

It was just something like $WT/HOME/loadFiles/content/VaultSymLink/documents/docNum/filename.doc in the load file, but we were holding those files just in a directory like /loadVault/documents/docNum/filename.doc

It was all pretty simple and we loaded probably a couple million parts/docs/notes/change objects/etc using this convention for any application data.

Chris
Top Tags