
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've been digging around and trying to make something that will work out of other similar solutions I've found but nothing is quite right and I can't seem to get them to work.
So I have a bunch of drawings with employee names and room/cube numbers that I need to be able to turn into a block. There will be one block for each employee/ location. I created a block called "Employee Location" with the attributes "Employee Name" and "Location". I want to be able to select the name then the location and have the predefined block take the place of the two individual MTEXT's.
I know I need the below code but I'm struggling with getting the selected MTEXT into one block. Ideally I would like the block to have the same layer as the text as well.
(defun c:Employee ( / "some needed variables here") (if (and (or (tblsearch "BLOCK" "Employee Location") (alert "Attributed Block <Employee Location> is not found in drawing <!>") ) (princ "\nSelect Employee name to be inserted into Attributed Block <Employee Location> :") (setq emp (ssget "_:L" '((0 . "MTEXT")))) (princ "\nSelect Employee location to be inserted into Attributed Block <Employee Location> :") (setq loc (ssget "_:L" '((0 . "MTEXT")))) )
Any help would be appreciated.
Solved! Go to Solution.