Object.ByGeometry returns null for any scripts on Civil 3D

Hello everyone,

I’m working on some Dynamo scripts that ultimately aim to create 3D objects in a DWG file in Civil 3D. At first, the script was working properly until a slight change, for example in the rotation of the objects, slowed down the software processing, and after half an hour I had to close the software using the task manager. When I opened the software again and tried to run the script again with the settings that were executed correctly, this time Object.ByGeometry returned null. Then I searched for this problem and found that one of the solutions that worked for others is to clean the Temp folder. I did this and again dynamo worked fine and visualized the object, but again with a small change in geometry rotation dynamo became so slow that I again had to close the software via task manager. When I opened Dynamo again, I encountered the problem of Object.ByGeometry returning again, with the difference that this time cleaning the Temp folder doesn’t work either. Also, I deleted and reinstalled the software once, and even tried it out on other scripts, but the problem was not resolved. The two attached images show this problem in two different scripts.
Ps: I am working on Dynamo on Civil 3D 2024 and in preference, I always have Geometry scaling processed in medium mode.

I would be very glad of your help and many thanks in advance!

1 Like

Have you cleaned the element bindings? There is a good post on Object Binding in Civil 3D on the forum which can help.