I am trying to read and get the MText of CAD files import Instances in Revit through Dynamo.
I used the Bimorph package v.3.03 which is the latest version I can use in Dynamo of Revit 2021, and the node used CADTextData.From Layers and it returns Empty List, but the layer name indicated contains all of the text items on that file, then I am looking alternatives to get the text in Dynamo.
The DWG file is on BIM360, perhaps that node cannot read the file because the file path is cloud type?
I am not sure about that assumption because the node finds that other layer (the layer “0”) of same file contains text.
It was not the case of the cloud/local file path, same result, I cannot upgrade to version 4 of the package because I get a warning telling me the packaga is for a newer version of Dynamo, and I do not want to upgrade Dynamo otherwise many other people around will have to do so and maybe other packages will not work anymore or scripts will stop to work.
what susprises me, that the layer 0 gets all the texts, I am thinking to move all file texts to that layer too, and filter by colour or text size
This looks like a bug which also affects the latest version, I’m investigating the cause but it seems like the layer filter is failing. It might be unsupported characters, for example periods in layer names are not supported and I notice your layers have dollar signs which could also be an unsupported character type.
If you provide no layerNames the node will return the text. The good news is it will be fixed this week, the bad news is it will only be fixed in the latest released. However, you can safely upgrade to v4.0.14 (when its released) just ignore that warning about requiring a new version of Dynamo to run it.
The node exports to DXF to parse the text. Unfortunately the DXF export has limitations on layer name characters so its not directly caused by BimorphNodes, just the export process.
then should I replace the symbols on layers: ( and ) , by something else valid?
I moved everything to layer 0 and filtering afterwards by colours, I changed the colours manually in CAD to do that, which is not ideal
also I noticed the extraction of text is split by number, symbol of a MText multitext of AutoCAD, but I was expecting to get all MText combined in a single string, or have a string by line of the MText to be able to use it
This is caused by the Revit DXF export - it separates the text into individual MTEXT entities so there is nothing we can do about it unfortunately. The order of the items will however be sequential in your list, so the index of 53.23 will follow M, 2 and Group room respectively so you might be able to use this coupled with some sort of bounding box filter to try and regroup from there but its never going to be that reliable.
Also if you explode your labels you will also notice how the text is separated - this is basically what happens when exporting to DXF.
The DXF file from the Revit export (the node uses this to extract text as its not possible via the Revit API). You can see that the area symbol is not selected when the area value text is selected. The same thing happens if you explode your labels in Autocad: