In Dynamo, there is a package that interacts with CAD data, such as retrieving curves or text data. It’s intriguing how this is accomplished in the background, considering Revit cannot access that data without exploding it.
Not really related to pyrevit, but download v1.5 of bimorph which is written in python and should show how this can be done.
that is curves from cad I am trying to get the text data from Cad
Youll have better luck over on dynamo forums where bimorphs manager is (thomas *mcmahon) - he is a regular there.
Given bimorph switched to c#, im guessing it was easier to handle this in that language.
Thomas Mahon is the author of Bimorph
Ah yes sorry mixing up my AEC Thomas’!
I believe the only thing you can do is export the cad as a dxf file and read that file line by line to get the text string, layer, position, etc. That is what I did in my CAD conversion script.
This site should help. Help
The file looks something like this with the number indicating what type of data is on the next line:
M-TEXT
100
AcDbMText
10
840.7128335803863
20
157.1522226413276
30
0.0
40
7.999999999999998
41
31.24067796610169
46
0.0
71
1
72
1
1
ROOF
7
Simplex_1
73
2
44
1.125730921843912
1001
REVIT
1002
{
1070
1
1000
4176118
1002
}
1002
{
1070
5
1000
4176081
1002
}
1002
{
1070
3
1000
4176093
1002
}
0
Hi @Crapai , I’m doing the exact same way as you said but I use package NetDxf combined with C# to read the DXF file. I got the result like I want but the point is how can I apply this method in Python? Do you have any example?