Importing text from CAD to REVIT Problem

Please, I do not know, why the script does not work.

What is the preview of the ImportInstance.GetComObjects node?

Looks like there is no text in the link you selected.

there are text in the autocad link

text%203

Is that text or a dimension?

1 Like

text

Please post a DWG with only the content above in it, an rvt with the dwg linked into it, and the dyn with the adjusted selections. If you can’t post them all here send them via google drive, box, etc.

21 may.dwg (137.0 KB)
Importing text from CAD to REVIT.dyn (22.3 KB)

thank you for your interest.

Eng/ Elsayed Elgendy, Egypt

No .rvt file, so I linked the DWG you provided into a new Revit 2019 project using the default Architectural template. The graph then ran for me up until the ‘TextNote.ByLocation’ node, which threw an error indicating I was attempting to work outside of the geometric limits of Revit. I inserted the dwg origin to origin, but scaling up the drawing which is in MM but by Dynamo as in feet results in a value of 500,000’, about 5x larger than Revit’s limit. using a MM metric file would resolve that issue. I resolved it by removing the node which scaled the geometry up 50x. Graph runs, no issues from there.

As far as why this isn’t working for you, I have two thoughts.

  1. Note that the ImportInstance.GetCOMObjects’ node requires a LinkedDWG, not an import instance as the name of the node implies. This is because the LingDWG package requires the CAD file in order to open it in AutoCAD. Use a link and toggle the ‘VisibleAutoCAD’ to true and select a link instance and then press run and you’ll see what I mean. AutoCAD should open in a visible state instead of in the back ground.

  2. The DWG you provided comes from a student version of AutoCAD. It could be old and associated with a previous user, but if you’re using the student version you may not have full API access, or API access which is slightly different as a result of the student licensing. This could cause the methods used in the LinkDWG package to fail. If the first issue doesn’t resolve the problem, can you confirm if you’re using a fully licensed version (not an educational version)?

2 Likes

the problem is about student version of AutoCAD.

thanks for helping

1 Like

Glad we narrowed that down.

You might be able to get the data in other ways though. Try using a dataextracrion command in AutoCAD, which will allow you to pull a lot of the information from the dwg to an intermediate csv file.

2 Likes