TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: TopoWAR on January 28, 2012, 02:13:10 PM
-
hello, you can create a new entity in AutoCAD from Lisp.
example:
(http://s3.subirimagenes.com:81/privadas/previo/thump_1740849exame.jpg)
thanks
-
Check these out.
---------- Entmake ----------------------
http://www.theswamp.org/index.php?topic=31145.0 ENTMAKE function by CAB
http://www.theswamp.org/index.php?topic=4814.msg112107#msg112107
http://www.theswamp.org/index.php?topic=17445.0 Min codes
-
CAB
thanks for replying, but routine creates MakeEntmake.lsp existing entities, circle, point, text .... I take care to create a new entity, such as:
TPLDTOPOLGCADNODE, see the picture above. NET can, but the question is: can with lisp. ? a clear example:
loaded application that creates the point
((-1 . <Entity name: 3110210>) (0 . "TPLDTOPOLGCADNODE") (330 . <Entity name: 31100f8>) (5 . "52") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "PUNTOS") (100 . "TPLDTopoLGCADNode") (70 . 1) (140 . 272.43) (141 . 205.819) (142 . 100.0) (143 . 1.5) (144 . 0.5) (90 . 1))
not loaded application that creates the point
((-1 . <Entity name: 7efc3dd0>) (0 . "ACAD_PROXY_ENTITY") (330 .
<Entity name: 7efc3cf8>) (5 . "52") (100 . "AcDbEntity") (67 . 0) (410 .
"Model") (8 . "PUNTOS"))
Please see dwg
-
My version of ACAD (2006 plain) does not support that entity so I can't test this.
Give it a try.
(entmakex
'((0 . "TPLDTOPOLGCADNODE")
(5 . "52")
(100 . "AcDbEntity")
(67 . 0)
(410 . "Model")
(8 . "PUNTOS")
(100 . "TPLDTopoLGCADNode")
(70 . 1)
(140 . 272.43)
(141 . 205.819)
(142 . 100.0)
(143 . 1.5)
(144 . 0.5)
(90 . 1)
)
)
-
This is a guess
TopoLGCAD may create custom objects and AutoCAD needs TopoLGCAD or an enabler installed to read/display the entities.
You MAY be able to create the objects with Lisp so that they are database resident BUT AutoCad may not know how to display the objects.
[/just a guess]
-
CAB
your code does not work, choose to use to recognize an entity xdata
-
Looking at the drawing object I see a simple + (2 lines) with text bundled into what looks like a block but the block is a proxy object.
I can't deal with that proxy with my system, sorry.