erdomke/InnovatorAdmin

Error while typing a new aml query

MangeshK3007 opened this issue · 5 comments

I am trying to add document as item and its related file(actual attachment) but when I click on editor I got nullpointer exception.

Please provide AML query to upload a file.

This is AML


<actual_filename>G:\abc.docx</actual_filename>

Sorry for the delay. After glancing at the code and some experimentation, it appears that you need to specify a new ID. For example, the AML shown below should work. I updated the wiki to reflect this.

<Item type='File' action='add' id='NEW_GUID_HERE'>
  <actual_filename>C:\Path\To\File.Extension</actual_filename>
</Item>

You can also specify a full structure such as

<Item type='Document File' action='add'>
  <source_id type='Document'>8481D6D585E7419DA5743B1AAC9FFBB9</source_id>
  <related_id>
    <Item type="File" action="add" id='78759E44FE8E48F1AF1D296AEF8E80B9'>
      <actual_filename>C:\Path\To\File.Extension</actual_filename>
    </Item>
  </related_id>
</Item>

Yet another option when creating a structure is to use the Intellisense to select the file using a browse dialog

uploadintellisense

If these options are still not working for you, let me know.

Thanks, It Works,
But every Time do I need to give a ID?
can ID be automatically generate, instead of providing by us?