Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/13/2019 in all areas

  1. The instruction to call a block from a dwg are in Lee's Steal.lsp you should read 1st, I have used it and it works well, just trying to remember which bit of code its in. ; cut a bit out of the code (if (not steal)(load "Stealv1-6")) (Steal <Dwg> <ItemList>) dwg obvious full pathed dwg name (Steal "C:\\My Folder\\MyDrawing.dwg" '( ("Blocks" "Block1" "Block22") ) )
    1 point
  2. try now (defun c:t1 ( / SplitStr doc spc csv fp data bn) (defun SplitStr ( s d / p ) (if (setq p (vl-string-search d s)) (cons (substr s 1 p) (SplitStr (substr s (+ p 1 (strlen d))) d)) (list s))) (if (and (setq doc (vla-get-activedocument (vlax-get-acad-object)) spc (vla-get-block (vla-get-activelayout doc))) (setq csv (getfiled "Select csv file" "" "csv" 0))(setq fp (open csv "r")) (read-line fp)) (while (and (setq data (read-line fp)) (setq data (splitstr data ",") bn (car data) pnt (cdr data))) (if (tblsearch "block" bn)(vla-InsertBlock spc (vlax-3d-point (mapcar 'atof pnt)) bn 1 1 1 0)))) (if fp (close fp)) (princ) )
    1 point
×
×
  • Create New...