Jump to content

Recommended Posts

Posted

Dear Sirs.

 

I would like to ask a queation, how to copy the subentity of a block without exploading the block?

 

Thanks very much.

Posted

Open the block editor and use a simple cut and paste into a new drawing perhaps?

Posted

Hi taner

 

If the express tools are installed try NCOPY

 

From the menu Express > Block > Copy Nested Objects

Posted

thanks!

I wonder if there is anthoer way ,how about using vla method?

Posted

Please try:

 

(defun c:test (/ basept ent ent_data)
   (vl-load-com)
   (setq ent_data (entget (car (setq ent (nentsel)))))
   (setq basept (cdr (assoc 10 (entget (car (last ent))))))
   (vla-TransformBy
(vlax-ename->vla-object
    (entmakex ent_data)
) ;_ vlax-ename->vla-object
(vlax-tmatrix
    (list
	(list 1. 0. 0. (car basept))
	(list 0. 1. 0. (cadr basept))
	(list 0. 0. 1. (caddr basept))
	(list 0. 0. 0. 1.)
    ) ;_ list
) ;_ vlax-tmatrix
   ) ;_ vla-TransformBy
) ;_ defun

Posted

(defun copy-fmblk (/ e el newent new-entlst)

(while (and

(setq e (nentselp "\n选择块内实体: "))

(= (length e) 4)

)

(setq el (entget (car e)))

(setq newent (entmakex el))

(vla-transformby (vlax-ename->vla-object newent) (vlax-tmatrix

(caddr e)

)

)

(setq new-entlst (cons newent new-entlst))

)

new-entlst

)

Posted

That looks like a similar (if not nigh identical) method to Wizmans

Posted

i tested taners version, allows multiple selection and ok also for nested blocks, but needs some extra coding for scaled(uniform/non-uniform) blocks.

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