CADkitt 发表于 2022-7-6 11:10:17

var=var2?

trying to make this simple script but I get a bad function A10 on output. I also don't know how to use the =.
 

(reninsatt "A10" "new block NEW LOGO" "Template_New_2010")

(defun reninsatt(oud new filename/)(progn         (command "-rename" "b" oud new)         (command "_.-insert" new = filename "y" nil)(command "_.attsync" "n" new)   ) (princ))

alanjt 发表于 2022-7-6 11:32:08

I don't think you can insert blocks that exist in another file, with the INSERT command. You can only insert the file itself.

dbroada 发表于 2022-7-6 11:55:55

I don't know about in LISP but in script it is
 
ExistBlockName=NewBlockName
 
to redefine the existing block to the definition in an external dwg file. Note that there are no spaces.

CADkitt 发表于 2022-7-6 12:23:47

yes, it inserts a file (exported wblock) but it inserts it as the name before the = so it replaces an old block which I want.
页: [1]
查看完整版本: var=var2?