For example, if I draw a straight line in grashopper, how do I import it into CAD in real time?
you can use Elefront to export to DWG and in autocad open the file as reference and you need every time click Reload all references in Autocad or find a way to do that automatically
I’d say you can’t without creating a vba macro in autocad.
The macro should get the GH geometry info somehow, say a .txt or xml or something then generate lines in real time.
External References in autocad act as blocks, as far as I remember. You can’t access the lines if that’s what you want.
I think this is pretty complex thing to do (in real-time).
But it’s been a while (4-5 years) since I last used Autocad so, who knows, maybe there’s a way now.
This is an interesting method. Thank you for your answer.
I 've seen someone make a grashopper component with c# in a forum before.
I’m not so experienced programmer but to do this there are two possible ways in my opinion.
Using COM objects. hacking yourself into the AutoCAD process while running passing data. This is a hell of a programming. I tried it. It is definitely not for noobs.
Serializing stuff in realtime and figuring out a way to deserialize from VBA inside autocad. For that you would need expertise in more than one language. Plus the performance will be bad.
I’d be glad to be proven wrong ;p
Or you could try to make a
Rhino.Inside version for the “CAD” that you are trying to communicate with. There’s a version for Revit…
I found the pH plug-in, a Chinese plug-in called SEG, but it’s not accepted by the official website because it’s always overdue.
Thank you. I found the source code.