[CAD Document] Query CADDocument File for download to local

Hi everyone,

Please show me how I can get information CADFiles(Native File / Viewable FIle) of CADDocument

My code as below.

-----------------------

Item docItem  = myAras.newItem("CAD", "get");

docItem .setAttribute("select", "*");

docItem.setProperty("item_number", "ABC");

Item relItem = myAras.newItem("CADFiles", "get");

relItem .setAttribute("select", "*");

docItem.addRelationship(relItem );

  • To get information CADFiles(Native File / Viewable FIle) of CADDocument

    Below is the query:


    Item docItem = myAras.newItem("CAD", "get");

    docItem .setAttribute("select", "native_file,viewable_file");

    docItem.setProperty("item_number", "ABC");

    docItem = docItem.apply();

  • Then you can write down below code:

    string NativeFileID = docItem.getProperty("native_file");

    string ViewableFileID = docItem.getProperty("viewable_file");

    Above line will return respective file id's.

    To get individual file information:

    Item NativeFile = myAras.newItem("File","get");

    NativeFile.setID(NativeFileID );

    NativeFile = NativeFile.apply();

    This is return file item.

    Similarly you can get file item for viewable file.

  • Hi AjinkyaGaikwad,

    Thanks a lot for your help, I'll try it now.