Message 1 of 5

Not applicable
05-29-2019
03:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm not a terribly proficient LISP writer, but I'm getting better...
I'm working on a LISP that will allow me to select rectangles and create a piece of text on a certain layer on their lower right bounds for an elaborate parsing system.
I've managed to make my selection filter and declare the text I want to create.
(defun C:HWEA ( / flt ss source_text n e1) (vl-load-com) ;load extended ActiveX just in case (setvar "CMDECHO" 1) ;I need a high level of verbosity during testing (prompt "\nSelect all racks - ") ;set current layer to extended text layer (command "._layer" "_M" "G-ANNO-EXT-TEXT" "_Color" "4" "") ;create ext text layer
(setvar "clayer" "G-ANNO-EXT-TEXT") ;set newly created layer to current (setq flt '((100 . "LWPOLYLINE") ;must be LWPOLYLINE (8 . "E-EQPM-RACK*") ;must be on a 'E-EQPM-RACK' layer (-4 . "<NOT") ;NOT FUTURE racks (8 . "E-EQPM-RACK-FUTURE") (-4 . "NOT>") (410 . "Model") ;only select objects in Model space ) );setq (setq ss (ssget flt)) ;selection set flt (setq source_text "H:100,D:42") ;text to create at each rectangle
Attached a screenshot and DXF for my examples.
Any advice would be much appreciated.
Solved! Go to Solution.