Hello everyone!
I am trying my hand at using Python3 within Dynamo.
I tried to create a point using the DesignScriptReference in .NET but failed.
The cause seems to be that there is no ByCoordinate method in the Point class.
Can anyone help me with a solution? .
ăCode Contentsă
Load the Python Standard and DesignScript Libraries
import sys
import clr
Add Assemblies for AutoCAD and Civil3D
clr.AddReference(âAcMgdâ)
clr.AddReference(âAcCoreMgdâ)
clr.AddReference(âAcDbMgdâ)
clr.AddReference(âAecBaseMgdâ)
clr.AddReference(âAecPropDataMgdâ)
clr.AddReference(âAeccDbMgdâ)
clr.AddReference(âProtoGeometryâ)
Import references from AutoCAD
from Autodesk.AutoCAD.Runtime import *
from Autodesk.AutoCAD.ApplicationServices import *
from Autodesk.AutoCAD.EditorInput import *
from Autodesk.AutoCAD.DatabaseServices import *
from Autodesk.AutoCAD.Geometry import *
from Autodesk.DesignScript.Geometry import *
Import references from Civil3D
from Autodesk.Civil.ApplicationServices import *
from Autodesk.Civil.DatabaseServices import *
The inputs to this node will be stored as a list in the IN variables.
test = IN[0]
result = Point.Bycoordinates(0,0,0)
Assign your output to the OUT variable.
OUT = result