0

I've followed the advice listed in the article https://forge.autodesk.com/blog/setting-up-references-between-files to publish a Revit 2018 model and its linked references to Forge. This works and I can successfully view the entire model with the Forge Viewer.

I haven't been able to get the same procedure to work on AutoCAD drawings with xrefs and am looking for help with this.

Are AutoCAD xrefs supported?

JGeerWM
  • 810
  • 10
  • 16
  • Hi @JGeerVM, I think it should work. I am building a simple test to verify. Could you also provide the test DWG files ? I can make simple files, but in case yours are specific. In addition, just fyi, post reference for the objects in bucket (by 2 legged token) is also available now https://developer.autodesk.com/en/docs/model-derivative/v2/reference/http/urn-references-POST/ – Xiaodong Liang Jan 08 '18 at 17:15
  • @XiaodongLiang I'm aware of the post reference api, but have not been successful with this approach. The version/refs api is the only one I have been able to get to work for Revit 2018 projects. Our application uses 3 legged tokens and the objects are in buckets associated with BIM 360. I'm not sure if this makes a difference. – JGeerWM Jan 09 '18 at 16:59
  • the post reference api I mentioned is for the scenario of 2 legged. The http request body format is different to wha with version/refs (for 3 legged). I just wanted to mention this in case you also need it. It looks you have found the root problem at your side. I will also give a test according to your description – Xiaodong Liang Jan 10 '18 at 04:15

2 Answers2

1

Firstly, what kind of response you got when you built the relationship of the two DWGs? 204 or others?

I prepared a DWG and Xref-ed with another DWG. Then I put them to my A360 storage. By Postman scripts, I accessed the two DWGs, and build the relationship with POST projects/:project_id/versions/:version_id/relationships/refs , according to the blog you also referred to. Finally post the translation job.

With the translated data, I verified the drawing is loaded correctly with the xref drawing.

The DWGs are available at: main.dwg http://a360.co/2AJ9Qga xref1.dwg: http://a360.co/2mhZ383

The Postman script to build relationship is: (I converted to curl for convenience) http://a360.co/2CHZGhC

The test harness of loading drawing is: jsfiddle.net/xiaodongliang/y41scm31/

Could you check anything that could help you to figure out the issue at your side? If you still have the problem, could you provide a test case? If it contains private info, please send it to forge.help@autodesk.com

enter image description here

enter image description here

Xiaodong Liang
  • 2,051
  • 2
  • 9
  • 14
  • After some testing, I've found that the problem appears to be with the Xref path. During publish to BIM 360, I am trying to group my xrefs in a subfolder named 'Reference', but if the Xref is attached from a relative path named '.\Xref\Floor Plan.dwg' the translation engine doesn't appear to find the file. This behavior is different from Revit, which works even if the relative path is different. – JGeerWM Jan 09 '18 at 20:06
  • path would affect.. I will give a test to verify if it is a problem of Forge API or as designed. – Xiaodong Liang Jan 10 '18 at 04:16
  • did you determine if this was a problem with the Forge API – JGeerWM Jan 15 '18 at 16:33
1

Apologize for my late response! I was on an urgent commitment these days. I can reproduce this issue you found. assume the source files relationship is:

main.dwg
\Xref\myxref.dwg

On Autodesk 360 Fusion team, the hierarchy is:

main.dwg
\ForgeTest\myxref.dwg

It succeeded with setting up reference, but the translation (to SVF) reports myxref.dwg is missing.

It can work with the two scenarios:

Either myxref.dwg locates in the same folder of main.dwg, i.e.

main.dwg
myxref.dwg

even though the source relationship indicates the xref is in a subfolder named 'Xref'.

Or, myxref.dwg locates in a sub folder with the same name, i.e.

 main.dwg
 \Xref\myxref.dwg

I logged a change request DERI-4747 with our engineer team .

Xiaodong Liang
  • 2,051
  • 2
  • 9
  • 14
  • Thank you for looking into this. We'll look forward to a resolution for DERI-4747. Hopefully these differences between AutoCAD and Revit can make it to the documentation for the API as known issues. That way when developers are planning to implement a feature, they can better understand the feasibility of the solution. – JGeerWM Jan 17 '18 at 15:01
  • yes, and thank you for reporting this issue that could help us to enhance the related functionalities. – Xiaodong Liang Jan 19 '18 at 05:56