「Vla-postcommand」の版間の差分

提供:GizmoLabs - だいたい CAD LISP なサイト
(ページの作成:「{{AutoLISP}} ; 構文 : (Vla-postcommand''vla-object'' ''commandlist'') ; 機能 : ドキュメントがアイドル状態になったときに、コマンド文字列…」)
(相違点なし)

2021年11月3日 (水) 21:37時点における版

構文
(Vla-postcommandvla-object commandlist)


機能
ドキュメントがアイドル状態になったときに、コマンド文字列をポストしてドキュメントで実行する。


引数
  • vla-object … SummaryInfo のVLAオブジェクト


戻り値
Authorプロパティの文字列


サンプル
(vl-load-com)
(defun c:Example_PostCommand()
  ;; 現在の図面の AutoCAD コマンド プロンプトに評価用のコマンドを送信する例。
  (setq acadObj (vlax-get-acad-object))
  (setq doc (vla-get-ActiveDocument acadObj))

  ;; Start creating a Circle in the active drawing
  (vla-PostCommand doc "._circle 2,2,0 ")
   
  (alert "CIRCLE command has been started, enter a radius to finish the command.")
)


(defun c:Example_PostCommand2()
  ;; 開いたファイルに対して実行する
  (setq doc (vla-open (vla-get-documents (vlax-get-acad-object)) (strcat "c:\\blocks\\" "my_block.dwg")))
  (vla-postcommand doc (strcat "_.-view " "_top "))
  (vla-activate my_doc)
)


関連事項