;;做匿名块
(defun c:mak_*block (/ blk pt ss)
  (princ "\n选取制作匿名图块的对象:")
  (if (and (setq ss (ssget))
	   (setq pt (getpoint "\n设定块原点:"))
      )
    (progn
      (setq obj (vlax-ename->vla-object (ssname ss 0)))
      (setq blk (fsxm-add-block ss "*U" (trans pt 1 0)))
      (setq space (vla-ObjectIDToObject *doc* (vla-get-OwnerID obj)))
      (vla-InsertBlock
	space
	(vlax-3d-point (trans pt 1 0))
	(vla-get-name blk)
	1
	1
	1
	0
      )
      (mapcar 'entdel (fsxm-ss->enlist ss))
    )
  )
  (princ)
)

;;不等分缩放测试中
(defun c:xyscale (/ blk pt ss obj scx scy scz space)
  (princ "\n选取要不等比缩放的对象:")
  (or (and (setq ss (ssget))
	   (setq pt (getpoint "\n缩放基准点:"))
      )
      (fsxm-silenceexit)
  )
  (setq scx (getreal "\nX方向比例<1>:"))
  (or scx (setq scx 1))
  (setq scy (getreal "\nY方向比例<1>:"))
  (or scy (setq scy 1))
  (setq scz (getreal "\nZ方向比例<1>:"))
  (or scz (setq scz 1))

  (vla-StartUndoMark *doc*)
  (setq blk (fsxm-add-block ss "*U" (trans pt 1 0)))
  (setq obj (vlax-ename->vla-object (ssname ss 0)))
  (setq space (vla-ObjectIDToObject *doc* (vla-get-OwnerID obj)))
  (vla-InsertBlock
    space
    (vlax-3d-point (trans pt 1 0))
    (vla-get-name blk)
    scx
    scy
    scz
    0
  )
  (setvar "cmdecho" 0)
  (command ".explode" "l")
  (while (/= 0 (getvar "cmdactive")) (command ""))
  (vla-delete blk)
  (mapcar 'entdel (fsxm-ss->enlist ss))
  (vla-EndUndoMark *doc*)
  (princ)
)
;;做匿名组
(defun c:mak_*group (/ ss)
  (princ "\n选取制作匿名组的对象:")
  (if (setq ss (ssget))
    (fsxm-add-group ss "*")
  )
  (princ)
)