與其他應用程式整合 > 整合的軟體管理 > Windchill Integration for Software Build Tools > 使用 Windchill Integration for Software Build Tools 指令 > AddContentToSWBuild
  
AddContentToSWBuild
AddContentToSWBuild 指令可透過查詢 URL 或上載磁碟上的本機檔案,將內容新增至物件。不需要使用者憑證即可從 URL 新增內容。
指令行語法
java —jar RBMWebServiceCore.jar —ServiceName AddContentToSWBuild —ContainerType —ContainerName —ObjectName [—Location] —Content —Filename [—IsPrimary] [-Revision]
引數
描述
—ContainerType
LIBRARY、PRODUCT 或 PROJECT 其中之一。
—ContainerName
容器名稱。
—ObjectName
會將附件新增至的物件名稱。
—Location
所指定容器中物件的位置。
—Content
要新增至物件的檔案內容。這可以是檔案的 URL 或磁碟上的本機檔案。
—Filename
要附加至物件之檔案的名稱。
—IsPrimary
可以為 truefalse。若未指定值,會將其視為附屬附件。
—Revision
版本修訂 ID。如果未指定版本修訂,則會使用最新版序。
組態檔案範本
<service>
<ServiceName>AddContentToSWBuild</ServiceName>
<ContainerType>...</ContainerType>
<ContainerName>...</ContainerName>
<ObjectName>...</ObjectName>
<Location>...</Location>
<Content>...</Content>
<Filename>...</Filename>
<IsPrimary>...</IsPrimary>
<Revision>...</Revision>
</service>
範例
欲在 GOLF_CART 容器的 Test Folder 位置,透過從 URL 上載內容來將主要內容新增至名為 TestSWBld3 的軟體版次物件,請鍵入:
java —jar RBMWebServiceCore.jar —ServiceName AddContentToSWBuild —ContainerType PRODUCT —ContainerName GOLF_CART —ObjectName TestSWBld3 —Location Test Folder —Content //<web_server>/WCIntClearCaseGuide.pdf —Filename Test PDF.pdf —IsPrimary true —Revision A
欲在 GOLF_CART 容器的預設位置,透過上載本機檔案來將附屬附件新增至名為 TestSWBld4 的軟體版次物件,請鍵入:
java —jar RBMWebServiceCore.jar —ServiceName AddContentToSWBuild —ContainerType PRODUCT —ContainerName GOLF_CART —ObjectName TestSWBld4 —Content D:\temp\SampleFile.txt —Filename TestTestFile.txt