Message 1 of 3
Insert block based on field content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to write a lisp routine that will insert a block based on the content of a filed. I have done this with attributes but not fields. I want to insert a block if the City field = Arlington. here is what I have so far
(setq BLKPATH "S:/CAD/Projects/AutoCAD/Configuration/Common/Notes/")
(setq CITY (strcase (substr CITY (-(strlen CITY) 1) 2)))
;(setq do_both 0)
(setq BLKNAME (strcat BLKPATH "Arlington_Note")) ; sets the PATH
(if (= CITY "ARLINGTON") (command "-INSERT" BLKNAME "0,0" "" "" ""))
Another question, can a lisp routine be run from a Batch file instead of a script?
I am thinking the code will be different since it is looking at a Field and not an Attribute
Any suggestions would be appreciated.