gigi.iacu
Guest
ilogic マクロ numeri Progressivi: ho creato una regola su ilogic che al click del マウス mi posiziona un numero Progressivo. però、ランダム、esce dalla マクロ。 ne vorrei capire il perchè.
Allegoプログラムマ。 si basa su un foglio.idw.
ho creato una nota sugli 編集 dei testi chiamata premontaggio (ostyle = odoc.stylesmanager.textstyles.item("premontaggio")))))
ho creato una variabile Personalizzata chiamata premontaggio che va aprendere il valore attraverso un modulo. sulla マクロ スロート anche un 入力 ボックス con apice iniziale.
サブメイン()
'parameter.updateafterchange = true
dim n_premontaggio として 整数
インタラクションとしてダイムオインタラクション
ointeraction = thisapplication.commandmanager.createinteractionevents
dim omouse として mouseevents
マウス = ointeraction.mouseevents
addhandler OMOuse.onmouseclick, アドレスof omouse_onmousedown
ointeraction.start(オインタラクション)
'parameter("premontaggio") = inputbox("inserire numero premontaggio", "premontaggio", パラメータ("premontaggio"))
エンドサブ
sub omouse_onmousedown(マウスブトン、シフトキーをポイントとしてモデル位置、ポイント2d、inventor.viewとしてビュー)
パラメータ.updateafterchange = true
odrawdocをdrawdocumentとして
odrawdoc = このアプリケーション.activedocument
' アクティブシートへの参照を設定します。
dim oactivesheet をシートとして
oactivesheet = odrawdoc.activesheet
' 汎用オブジェクトへの参照を設定
dim の一般ノートとして一般ノート
ジェネラルノート = oactivesheet.drawingnotes.generalnotes
過渡幾何学としてdimのotg
otg = thisapplication.transientgeometry
'入力として単純な文字列でテキストを作成します。 これは使用しないので
' テキストが上書きされると、デフォルトはアクティブなテキストスタイルになります。
stext を文字列として定義する
'messagebox.show(1,1)
dim の一般記者として一般記者
' 左側に番号をつけて整列する一連のメモを作成します。
dim dycoord として ダブル
dim dxcoord として ダブル
dycoord = modelposition.y(モデルポジション)
dxcoord = modelposition.x
dim ostyle をテキストスタイルとして
odocをdrawdocumentとして
odoc = このアプリケーション.activedocument
ostyle = odoc.stylesmanager.textstyles.item("premontaggio")
'messagebox.show(2,2)
generalnote = ogeneralnotes.addfitted(otg.createpoint2d(dxcoord、dycoord)、パラメータ("premontaggio")、ostyle)
'messagebox.show(3,3)
パラメーター("premontaggio") = パラメータ("premontaggio") + 1
'messagebox.show(4,4)
エンドサブ
Allegoプログラムマ。 si basa su un foglio.idw.
ho creato una nota sugli 編集 dei testi chiamata premontaggio (ostyle = odoc.stylesmanager.textstyles.item("premontaggio")))))
ho creato una variabile Personalizzata chiamata premontaggio che va aprendere il valore attraverso un modulo. sulla マクロ スロート anche un 入力 ボックス con apice iniziale.
サブメイン()
'parameter.updateafterchange = true
dim n_premontaggio として 整数
インタラクションとしてダイムオインタラクション
ointeraction = thisapplication.commandmanager.createinteractionevents
dim omouse として mouseevents
マウス = ointeraction.mouseevents
addhandler OMOuse.onmouseclick, アドレスof omouse_onmousedown
ointeraction.start(オインタラクション)
'parameter("premontaggio") = inputbox("inserire numero premontaggio", "premontaggio", パラメータ("premontaggio"))
エンドサブ
sub omouse_onmousedown(マウスブトン、シフトキーをポイントとしてモデル位置、ポイント2d、inventor.viewとしてビュー)
パラメータ.updateafterchange = true
odrawdocをdrawdocumentとして
odrawdoc = このアプリケーション.activedocument
' アクティブシートへの参照を設定します。
dim oactivesheet をシートとして
oactivesheet = odrawdoc.activesheet
' 汎用オブジェクトへの参照を設定
dim の一般ノートとして一般ノート
ジェネラルノート = oactivesheet.drawingnotes.generalnotes
過渡幾何学としてdimのotg
otg = thisapplication.transientgeometry
'入力として単純な文字列でテキストを作成します。 これは使用しないので
' テキストが上書きされると、デフォルトはアクティブなテキストスタイルになります。
stext を文字列として定義する
'messagebox.show(1,1)
dim の一般記者として一般記者
' 左側に番号をつけて整列する一連のメモを作成します。
dim dycoord として ダブル
dim dxcoord として ダブル
dycoord = modelposition.y(モデルポジション)
dxcoord = modelposition.x
dim ostyle をテキストスタイルとして
odocをdrawdocumentとして
odoc = このアプリケーション.activedocument
ostyle = odoc.stylesmanager.textstyles.item("premontaggio")
'messagebox.show(2,2)
generalnote = ogeneralnotes.addfitted(otg.createpoint2d(dxcoord、dycoord)、パラメータ("premontaggio")、ostyle)
'messagebox.show(3,3)
パラメーター("premontaggio") = パラメータ("premontaggio") + 1
'messagebox.show(4,4)
エンドサブ
Last edited: