Sponsored links

【AutoLISP サンプル】Lesson記事に出てきたコマンド

Sponsored links
Sponsored links
Sponsored links

ブロック挿入

(defun c:test () 
   (command-s "._-INSERT" "Test" "NON" "200,25,0" "1" "1" "0")
(princ))

ブロック/外部参照 から図形を同じ場所に抽出

(defun c:NC00 ()
	(command "._NCOPY" pause "" "0,0.0"  "0,0.0")
(princ))

同じ位置にコピー&ペースト

(defun c:CC ()
 (command-s "._COPYBASE" "0,0") 
(princ))

;================================

(defun c:VV ()
 (command-s "._PASTECLIP" "0,0") 
(princ))

メニューバー&リボンを表示/非表示 切り替えコマンド

メニューバー リボン 両方

(defun c:Bar ()
     (if (= (getvar "RIBBONSTATE") 1)
        (progn
           (command-s "._RIBBONCLOSE")
	   (setvar "MENUBAR" 0)
	);progn else
        (progn 
	    (command-s "._RIBBON")
	     (setvar "MENUBAR" 1)
	);progn
     );if			
(princ))

メニューバーだけ

(defun c:MBar ()
     (if (= (getvar "MENUEBAR") 1)
        (setvar "MENUBAR" 0)
	(setvar "MENUBAR" 1)
     );if			
(princ))

リボンだけ

(defun c:RBN ()
	(if (= (getvar "RIBBONSTATE") 1)
	  (command-s "._RIBBONCLOSE")
	  (command-s "._RIBBON")
	);if			
(princ))

オブジェクトスナップをお気に入りの設定にする

(defun c:FavoriteSnap ()
  (setvar "OSMODE" 231)
(princ))

オブジェクトスナップ NOD(点)だけON/OFF切り替え

(defun c:test (/ OS)
  (setq OS (getvar "OSMODE"))

  (if (= 0 (logand 8 OS))
     (setq OS (+ OS 8))
     (setq OS (- OS 8))
  )

(setvar "OSMODE" OS)
(princ))
Sponsored links
Sponsored links
Sponsored links