Upload Native File for CAD Document

Hello,

I am trying to upload a native file for a CAD Document via Batch Loader but I have been receiving an error and am not sure how to fix it or don't know what would be wrong. I'm wondering if someone could help me for this matter. Thank you very much in advance for any help.

<Item type='CAD' action='add'>

  <id>
    <Item type='CAD' action='get' select='id'>
      <keyed_name>@1</keyed_name>
    </Item>
  </id>
  <native_file>
    <Item type='File' action='add' select='id'>
      <actual_filename>@2</actual_filename>
      <filename>@3</filename>
    </Item>
  </native_file>
</Item>

CAD Document ID: 43C9E89F5BC140BF843DDF392D47C88D (Should I use CAD Document Number 50104-DRW?)

Native File: full path file location

File Name: X.SLDDRW

Error:

[3:57:12 PM]: Start batch load
[ *** Worker process for lines 2 - 2 *** ]:
[3:57:13 PM Worker process for lines up to 1 (Thread #1)]: Logged in
[3:57:14 PM Worker process for lines up to 1 (Thread #1)]: #1 - <Item type="CAD" action="add"><id><Item type="CAD" action="get" select="id"><keyed_name>43C9E89F5BC140BF843DDF392D47C88D</keyed_name></Item></id><native_file><Item type="File" action="add" select="id"><actual_filename>V:\Company\ERP\Internal\Batch Loader - Engineer\BatchLoader - PLM SP15 Test\Test Adding CAD Native File</actual_filename><filename>X.SLDDRW</filename></Item></native_file></Item>
[3:57:14 PM Worker process for lines up to 1 (Thread #1)]: #1 - <Fault>
[3:57:14 PM Worker process for lines up to 1 (Thread #1)]: <SOAP-ENV:Envelope xmlns:SOAP-ENV="">schemas.xmlsoap.org/.../"><SOAP-ENV:Body><SOAP-ENV:Fault xmlns:af="">www.aras.com/.../faultcode><faultstring><![CDATA[No items of type CAD found.]]></faultstring><detail><af:legacy_detail><![CDATA[No items of type CAD found.]]></af:legacy_detail><af:legacy_faultstring><![CDATA[No items of type 'CAD' found using the criteria:
<Item type="CAD" action="get" select="id" doGetItem="0"><keyed_name>43C9E89F5BC140BF843DDF392D47C88D</keyed_name></Item>
]]></af:legacy_faultstring></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
[3:57:14 PM Worker process for lines up to 1 (Thread #1)]: Finished
 processed successfully - 0
 average processed request time - 0 ms
 failed to process - 1
 total time - 0 sec
[3:57:14 PM]: Finish batch load: succeeded - 0; failed - 1

Parents
  • Hello,

    I was able to load my native file to a CAD Document so I would like to share my AML script with someone who might be in the same situation like me. 

    <Item type="Part CAD" action="add">  

      <source_id>@1</source_id>  (You can find this id from Part (id) or Part CAD (Source id) Tables: 

      <related_id>

        <Item type="CAD" select="id" action="edit" id="@2"> (You can find this id from Part CAD (Related id)

          <native_file>

            <Item type="File" action="add">

              <filename>@3</filename>  (Actual file name)

              <actual_filename>@4</actual_filename> (Actual file path)

              <Relationships>

                <Item type="Located" action="add">

                  <related_id>XXXX</related_id> (The default VAULT id)

                </Item>

              </Relationships>

            </Item>

          </native_file>

        </Item>

      </related_id>

    </Item>

    I hope this AML Script would be useful for someone who is trying to load a native file.

    Regards,

    Jakk

Reply
  • Hello,

    I was able to load my native file to a CAD Document so I would like to share my AML script with someone who might be in the same situation like me. 

    <Item type="Part CAD" action="add">  

      <source_id>@1</source_id>  (You can find this id from Part (id) or Part CAD (Source id) Tables: 

      <related_id>

        <Item type="CAD" select="id" action="edit" id="@2"> (You can find this id from Part CAD (Related id)

          <native_file>

            <Item type="File" action="add">

              <filename>@3</filename>  (Actual file name)

              <actual_filename>@4</actual_filename> (Actual file path)

              <Relationships>

                <Item type="Located" action="add">

                  <related_id>XXXX</related_id> (The default VAULT id)

                </Item>

              </Relationships>

            </Item>

          </native_file>

        </Item>

      </related_id>

    </Item>

    I hope this AML Script would be useful for someone who is trying to load a native file.

    Regards,

    Jakk

Children
  • Hi Jakk

    I tried to use same AML but i am getting error as "File Item cannot be added."

    In My case only change is, instead of Native file i am working on Viewable.

    Please suggest

  • Hello Sameer,

    I tested it on my end and it worked. Please see the script below:

    <Item type="Part CAD" action="add">
    <source_id>@1</source_id>
    <related_id>
    <Item type="CAD" select="id" action="edit" id="@2">
    <viewable_file>
    <Item type="File" action="add">
    <filename>@3</filename>
    <actual_filename>@4</actual_filename>  (Actual file name)
    <Relationships>
    <Item type="Located" action="add">  (Actual file path)
    <related_id>67BBB9204FE84A8981ED8313049BA06C</related_id> (The default VAULT id)
    </Item>
    </Relationships>
    </Item>
    </viewable_file>
    </Item>
    </related_id>
    </Item>