Dynamo vs Autocad


#1

This is my lesson, which solves the problem of interaction between Dynamo and AutoCAD. Lesson in Russian, but it is understandable


#2

Python code:

import clr

clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *

clr.AddReferenceToFileAndPath(‘C:\Program Files\Autodesk\AutoCAD 2015\Autodesk.AutoCAD.Interop’)

from Autodesk.AutoCAD.Interop import *
from System import *

restart = IN[0]

curves = IN[1]

acadApp = AcadApplicationClass()
acadApp.Visible = True

for i in (curves):
p1 = i.StartPoint
p2 = i.EndPoint
p1C = Array[float]([p1.X, p1.Y, p1.Z])
p2C = Array[float]([p2.X, p2.Y, p2.Z])
lin = acadApp.ActiveDocument.Database.ModelSpace.AddLine(p1C, p2C);

acadApp.ZoomExtents();


#3

This is really great! Commands are from ObjectARX, right?


#4

yes


#5

FEM Mesh in AutoCAD
Dynamo_pandus


#6

Hello Khasan. Mamaev,

Wow, this is cool. Have you uploaded any package for this?

Thanks,

Rtiesh

 


#7

#8

how can I make the reverse process, look for an entity in AutoCAD and send to Dynamo

acadApp.ActiveDocument.Utility.GetEntity(object, object, object)

 


#9

Excuse me please, but I do not know how to do it. I am currently engaged in this task. On the results of write here