[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 );

Parents Reply
  • I hope the below code helps you.

    Innovator inno = getInnovator();

    string nativeFilePath = @"C:\plm\logs\1343939490.dwg";

    Item NewCAD = inno.newItem("CAD","add");
    NewCAD.setFileProperty("native_file", nativeFilePath);
    NewCAD = NewCAD.apply();

    return inno.newError(NewCAD.getErrorString());

    return inno.newResult("New CAD '" + NewCAD.getProperty("item_number") + "' is created.");