@nilesh.bhosale wrote:
this whole process will be done manually, because the old template name is different in different drawings so we have to delete the old template manually by opeing the drawing and then insert the new template on the same place. BUT just required some of attribute text to be imported in new template.
That will be fine IF the TAG name remains the same. if not, the user may have to select the attribute one after the other to "get" and "set" the attribute the values, which means the new block will need to be inserted first so the user can manually select what attribute values goes to where and what especially if the TAG name does not match.
(defun c:ctxt (/ source target)
(while
(and (setq source (car (nentsel "\nSelect Source: ")))
(setq target (car (nentsel "\nSelect target ")))
)
(vla-put-textstring (vlax-ename->vla-object target)
(vla-get-textstring
(vlax-ename->vla-object source)))
)
(princ)
)
May require a regen if the "TKII_MHE_SYSTEM" block or any attribute will remain as nested object.
If its the former then we can automate the process. It would help if you identify what attribute value(s) you want to copy, otherwise you may need a list of tag names which shows the "From" and "To". And what of the issue of exploding the block "TKII_A1" as it does not have the target attributes on the parent block.
HTH