i wrote the following code
(defun c:PasteBlockX ()
(command "_.pasteblock" "0,0,0")
(command "_.erase" "_L" "")
(command "-insert" "")
(princ)
)
code is working fine scalling the clipboard drawing data both X and Y direction
the problem is that when the current clipboard data is not drawing (for example bitmap) , the function halts on many errors :::
Command:
Command: PasteBlockX _.pasteblock
Command: 0,0,0 Unknown command "0,0,0". Press F1 for help.
Command: _.erase
Select objects: _L 0 found
Select objects:
Command: -insert Enter block name or [?]:
Invalid block name.
; error: Function cancelled
How to halt / stop / exit command aborting the following "_.pasteblock" command code?
Untested...
(defun c:PasteBlockX () (command "_.pasteblock") (if (> (getvar 'cmdactive) 0) (progn (command "0,0,0") (command "_.erase" "_L" "") (command "-insert" "") ) (princ "\nWrong type of data, in clipboard... ") ) (princ) )
Hope this helps,
Henrique