AutoCADで1つ以上のスプラインを自動的に「再構築」できるいくつかの機能を探しています。私は30-50のコントロール頂点を持つ数百のスプラインを持つ図面を持っています。これにより、特にこれらのスプラインのグループと直接対話するときに、図面が非常に遅くなります。AutoCADで複数のスプラインを再構築
私は何をしたいのかに関する基本的なコードを持っていますが、この時点でAutoLISPでcvrebuildコマンドを使用する方法はわかりません。コマンドラインでこのコマンドを使用すると、GUIが表示されます。私がこれまで持っていたことは、以下のコードを見てください。
変数n_controlverticesとdegreeを引数として使用して、単にcvrebuildコマンドを呼び出す必要があります。 AutoLISPルーチンは、一度に1つのオブジェクトを通過し、同じパラメータでそれらを再構築します。
コードの外観についてお詫び申し上げます。どうやらAutoLISPのはStackOverflowの
;; Batch rebuild splines
;;defines command name and variables
(defunをCとうまく再生されない: "再構築する\ nSelectスプライン" batchrebuild(/ SS N OBJ n_controlvertices度)
;; asks for selection
(プロンプト )を
;;decides if any splines are selected, and if not selects all
((ない(setqのSSの(ssgetなら '((0。 "SPLINE"))))) (setqのSSの(ssget "_X"'((0。 "SPLINE")))) )
;;sets allowable entry to [2 (only nonzero) + 4 (only positive)]
(initget 6)
;;asks for number of fit points. if nothing is entered, it gives it the default value of 20
(setqののn_controlvertices(GetIntで "\ nNumber制御頂点の< 20>:"))
(IF (= n_controlvertices NIL) (setq n_controlvertices 20) (setq n_controlvertices(fix n_controlvertices))
;;asks for degree of fit points. if nothing is entered, it gives it the default value of 3
(setqの度合い(GetIntで "\フィット点のnDegree < 3>:"))
( (=度nilの場合) (setqの度3) (setqの度(修正程度) )
)
(リピート(setqのN(sslength SS))
(setq obj (vlax-ename->vla-object (ssname ss (setq n (1- n))))
;;(command cvrebuild)
;;This is the part that I am not sure about
)
(のprinc) )
ありがとうございました!私はAutoLISPの初心者ですが、その中には答えを見つけるのが難しいものがあります。 AutoCADコマンドとそれに関連するパラメータの実装方法に関する資料はありますか?私は、Javaの各コマンドのドキュメント(パラメータ、オプション、インスタンス変数など)を検索できることに慣れています。 –