Jump to content

macro for automatic select + setbylayer + refedit


jim78b

Recommended Posts

i need please and thanks in advance for your indispensable help, a macro that with one mouse click select block setbylayer and the refedit.

 

^C^C_.select;\._setbylayer previous;;;;._select previous;_refedit previous;

 

not work!

Link to comment
Share on other sites

So I think recently someone was asking about setbylayer - there should be a LISP for that out there easy to get. What do you want to do when you refedit the block by the way, that might alter what commands to use.

 

This is the first bit you are looking for, select a single entity and check that it is a block, you can do similar with ssget, but I can't remember just now how to limit it to a single object selection - that came up recently to I think

 

  (setq MyEnt (entget (car (entsel "\nSelect Block"))) )
  (while (/= (cdr (assoc 0 MyEnt)) "INSERT") ;; loop if a block ins't selected
      (setq MyEnt (entget (car (entsel "\nBlock not selected. Select Block"))) )
  );end while

 

returns the block entity MyEnt. 

 

  • Like 1
Link to comment
Share on other sites

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...