CreateAndUpload
The CreateAndUpload command can create, upload, and attach a file to the following Windchill objects:
a new software build
a new software document
a new software configuration data document
a new software part
If a specified software build, software document, or software configuration data document exists, the version of the file is iterated. A software part can have related software documents.
There is no support in a software part for the following:
uploading a file to a software part
creating an End-item for software part
Refer to Managing Software Parts and Working with Related Software Documents in the Windchill Help Center for more information.
Command-Line Syntax
java —jar RBMWebServiceCore.jar —ServiceName CreateAndUpload —ContainerType —ContainerName —ObjectType —ObjectName —Filename [—Location] [—IsPrimary]
Argument
Description
—ContainerType
One of LIBRARY, PRODUCT, or PROJECT.
—ContainerName
Name of the container.
—ObjectType
Create an object type. Applicable object types are SWPart, SWBuild, SWDocument, or SWConfData.
—ObjectName
Name of the object.
—Location
A location in the specified container.
—Filename
Name of the file to upload for SWBuild, SWDocument, or SWConfData. You must provide an absolute path and not the relative path to the file.
* 
Do not enter a filename attribute for a SWPart, else an error occurs due to the inability of a file being uploaded to a software part. Hence, leave the —Filename attribute “blank.”
—IsPrimary
Either true or a false. If you do not specify a value, the file is added as a secondary attachment.
* 
Do not enter a primary attribute for a SWPart, else an error occurs due to the inability of a file being attached to a software part. Hence, leave the —IsPrimary “blank.”
Configuration File Template
<service>
<ServiceName>CreateAndUpload</ServiceName>
<ContainerType>...</ContainerType>
<ContainerName>...</ContainerName>
<ObjectType>...</ObjectType>
<ObjectName>...</ObjectName>
<Location>...</Location>
<Filename>...</Filename>
<IsPrimary>...</IsPrimary>
</service>
Example
To create and add a software build object as a primary attachment, type:
java —jar RBMWebServiceCore.jar —ServiceName CreateAndUpload —ContainerType PRODUCT —ContainerName GOLF_CART —ObjectType SWBuild —ObjectName TestSWBld1 —Filename d:\full_path_to_location\upload.zip —Location Test Folder —IsPrimary true
To create a software build object at the default location of a container and add a secondary attachment to it, type:
java —jar RBMWebServiceCore.jar —ServiceName CreateAndUpload —ContainerType PRODUCT —ContainerName GOLF_CART —ObjectType SWBuild —ObjectName TestSWBld1 —Filename d:\full_path_to_location\upload.zip
To create a software part object at the default location of a container, type:
java —jar RBMWebServiceCore.jar —ServiceName CreateAndUpload —ContainerType PRODUCT —ContainerName GOLF_CART —ObjectType SWPart —ObjectName TestSWpart1
Was this helpful?