Message 1 of 5
bad argument type: consp #<variant 8197 ...>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
some one can help me with this code pls, im rlly new in this
(defun c:AUTEXT ()
(setq spaces '())
(setq text-to-insert "100")
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
(vlax-for obj (vla-get-ModelSpace doc)
(if (= "AcDbPolyline" (vla-get-objectname obj))
(setq spaces (cons obj spaces))
)
)
(foreach space spaces
(setq points (vlax-get-property space 'Coordinates))
(setq centroid (mapcar '+ (car points) (last points)))
(setq text-entity (vla-addText (vla-get-ModelSpace doc) "AUTEXT" (vlax-3D-point centroid) 1.0))
)
(princ)
)