No module named DesignScript

Hello, I have been using Civil 2022 at my home and I had no problem with my script what so ever.
however, when I used another PC which has Civil 2021, it doesnt recognize the module DesignScript for some reason, can someone confirm that its not working on Civil 2021 ?
it says No module named DesignScript
image

I think you need to use:

clr.AddReference("ProtoGeometry")

before importing the namespace.

So add that line

clr.AddReference("ProtoGeometry")

between row 11 and 12

Yea totaly worked thanks, for the record I dont think we need to add that row in 2022

Weird, because you always have to load a Library (.dll) before calling upon the namespaces within. But I haven’t worked with the 2022 versions of the Autodesk software yet, so I can’t test this theory.

Glad this solved your issue!

Is there a way to know every .dll to be called that corresponding the tools I need ?
as example Im having the same problem with the following error:
AttributeError: ‘Autodesk.Civil’ object has no attribute ‘DynamoNodes’
Im sure it can be fixed with calling certain clr.AddReference(“xxxxx”)
Again 2022 doesnt have this issue at all which is strange. apparently they are automatically loaded or they are included in parent modules.