Jump to content

Recommended Posts

Posted (edited)

Hi,

I've been trying tons 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.

Edited by aabfm
Posted

Post a drawing of what you are trying to accomplish.

Posted
That's a different forum, how would that be a duplicate?

Duplicate on the internets dude!!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...