Skip to main content
10-Marble
November 27, 2012
Question

Attaching documents

  • November 27, 2012
  • 3 replies
  • 884 views
OK, I know (or I'm sure) I'm missing the easy helper class or some such
here, but I'd like to programmatically attach a document (WTDocument) to
a Part (WTPart). Any pointers?



Sorry for what may be such a simple question.



Brian Krieger

Peterbilt Motors

3 replies

10-Marble
November 27, 2012
OK, just needed a new morning's perspective (I meant to send this
yesterday). I was calling .store against a non-working copy. Oops.



Sorry for the lack of patience.

Brian


1-Visitor
November 27, 2012
InfoEngine task will do this. You can create the task, place it in your Windchill directory structure and call it from a workflow directly. Otherwise you can register the task officially and use it externally for this via a SOAP call or some other method.

[cid:image001.gif@01CDCC8A.7BA2C370]

Steve Vinyard
Application Engineer
10-Marble
November 27, 2012
Brian,

From Java you can just create a persistent link object of
the appropriate type. For example:

WTPartDescribeLink aLink = WTPartDescribeLink.newWTPartDescribeLink(aPart, aDoc);
PersistenceServerHelper.manager.store(aLink);

Hope this helps,

Ron