TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: TopoWAR on January 28, 2012, 02:13:10 PM

Title: create a new entity
Post 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
Title: Re: create a new entity
Post by: CAB on January 28, 2012, 02:53:50 PM
Check these out.

Code: [Select]
----------  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
Title: Re: create a new entity
Post by: TopoWAR on January 28, 2012, 03:11:01 PM
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
Code: [Select]
((-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
Code: [Select]
((-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
Title: Re: create a new entity
Post by: CAB on January 28, 2012, 07:04:14 PM
My version of ACAD (2006 plain) does not support that entity so I can't test this.
Give it a try.
Code: [Select]
(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)
   )
)
Title: Re: create a new entity
Post by: Kerry on January 28, 2012, 07:20:21 PM
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]
Title: Re: create a new entity
Post by: TopoWAR on January 28, 2012, 07:54:13 PM
CAB
your code does not work, choose to use to recognize an entity xdata
Title: Re: create a new entity
Post by: CAB on January 28, 2012, 09:24:59 PM
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.