I am attempting to insert two blocks with the same insertion point using the same scale factor using one macro. I have been successful in doing this using diesel and only in Autocad LT. I am trying to create a similar macro for a full version of Autocad 2004 and 2005. Here is the macro I have for the LT version. ^c^c$m=setenv;scale;\-insert;elemark.dwg;\"$m=$(getenv,scale)";;\;;-insert;elemark-att.dwg;@;"$m=$(getenv,scale)";;0; I have attempted to create this command but I am unsure if this is set up correctly. Here is the command for the full version. ^C^C(setenv"scale""\");$m=-INSERT;"ele-mark.DWG";\"$m=$(getenv,scale)";\$m=-INSERT;"elemark-att.DWG";@;"$m=$(getenv,scale)";0; any suggestions are greatly appreciated.
Change: C^C(setenv"scale""\");$m=-INSERT;"ele-mark.DWG";\"$m=$(getenv, scale)";\$m=-INSERT;"elemark-att.DWG";@;"$m=$(getenv,scale)";0; To: ^c^c(command "-insert" "ele-mark" pause (getvar "dimscale") "" "")(setq pt (getvar "lastpoint"))(command "-insert" "elelmark-att" pt (getvar "dimscale") "" "") Watch for word wrap.. Bob
I am unable to use the (getvar "dimscale"). I would like the user to be able to input the scale for the first inserted block and use that scale from the first block for the scale of the second block. I wouldnt mind setting the scale prior to the insert command. and have it look something like this. ^C^C(setq scale "#")( command "-insert" "ele-mark" pause scale "" pause)(setq pt (getvar "lastpoint"))(command "-insert" "ele-mark-att" pt scale "" "") Where the # in the first setq string is input by the user. any suggestions?
Modified: ^C^C(setq scale (getreal "\nScale Factor"))(command "-insert" "ele-mark" pause scale "" pause)(setq pt (getvar "lastpoint"))(command "-insert" "ele-mark-att" pt scale "" "") Bob
No need to save "pt" -- ^C^C(setq scale (getreal "\nScale Factor"))(command "-insert" "ele-mark" pause scale "" pause)(command "-insert" "ele-mark-att" (getvar "lastpoint") scale "" "") Kent Cooper, AIA pause scale "" pause)(setq pt (getvar "lastpoint"))(command "-insert" "ele-mark-att" pt scale "" "")