Visual LISP, AutoLISP and General Customization
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Problem inserting blocks with attributes
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
I've been trying hundreds of different solutions to solve this problem: insert a block that has an attribute which happens to be the last object id.
This is the best code I tried so far but without any succss.
(defun c:q1()
(command "_.PLINE")
(while (= (getvar "CMDNAMES") "PLINE")
(command pause)
)
(setq objname (entlast))
(setq oad (getvar "attdia"))
(setq orq (getvar "attreq"))
(setq oec (getvar "cmdecho"))
(setvar "attdia" 1)
(setvar "attreq" 0)
(setvar "CMDECHO" 0)
(setq xScale 1)
(setq yScale 1)
(setq rot 0)
(setq at1 "abc")
(setq pt (getpoint "\nSpecify Insertion Point: "))
(command "_.insert" "TROC_PRP" pt xScale yScale rot objname)
(setvar "attdia" oad)
(setvar "attreq" orq)
(setvar "cmdecho" 1)
)
Can you help me?
Kind regards.
