Home Home Home Home

  • Konuyu başlatan Konuyu başlatan gigi.iacu
  • Başlangıç tarihi Başlangıç tarihi

gigi.iacu

Guest
ilogic makro numeri ilerlemesi: creato una regola su ilogic che al click del fare mi posiziona un numero ilerlemeivo. però, rastgele, esce dalla makro. Ne vorrei capire perchè.


Allego programma. si basa su un foglio.idw.
creato una nota sugli editör dei testi chiamata premontaggio ( ostyle = odoc.stylesmanager.textstyles.item("premontaggio")

creato una Variabile kişiselizzata chiamata premontaggio che va aprendere valore attraverso un modlo. Sulla makro sotto trovate anche un input box con apice youale.

alt ana()
'Parameter.update afterchange = true
dim n_premontaggio as Full

dim ointeraction as etkileşimi
Ointeraction = thisapplication.commandmanager.createinteractionevents

dim omouse as mouseevents
omouse = ointeraction.mouseevents
Addhandler omouse.onmouse display, addressof omouse_onmousedown

Ointeraction.start
"Parametre ("premontaggio") = giriş kutusu ("inserire numero premontaggio", "premontaggio", parametre ("premontaggio")

Sonunda alt alt

Sub omouse_onmousedown (button as mousebuttonenum, switchkeys as changestateenum, modelposition as point2d, view as mucit.view)
parametre.update afterchange = true

dim odrawdoc as çizimdocument
Odrawdoc = buapplication.activedocument

“ Aktif sayfaya bir referans ayarlayın.
dim oactivesheet as page
Oaktif tablo = odrawdoc.aktif tablo

“Genel nesnelere bir referans ayarlayın
dim o generalnotes as generalnotes
O genel notlar = oaktif tablo.drawingnotes. genel notes

dim heg as Geçicigeometry
Og = buapplication.transientgeometry.

“Derin olarak basit bir dize ile metin oluşturun. Bu kullanılmadığından beri
“Herhangi bir metin overrides, aktif metin stiline varsayılan olacaktır.
dim stext as string
"messagebox.show (1,1)
dim o generalnote as generalnote

“Solun yanında numaralandırılmış ve hizalanmış bir dizi not oluşturun.
dim dycoord çift olarak
dim dxcoord çift olarak

dycoord = modelleme.y
dxcoord = modelleme.x

dim ostyle as textstyle
dim odoc as çizimdocument
Odoc = buapplication.activedocument
Ostyle = odoc.stylesmanager.textstyles.item ("premontaggio")
"messagebox.show(2,2)
O genel note = o generalnotes.addfized(otg.createpoint2d(dxcoord, dycoord), parametre ("premontaggio") ostyle)

"messagebox.show(3,3)
parametre ("premontaggio") = parametre ("premontaggio") + 1
'messagebox.show(4,4)
Sonunda alt alt
 
Son düzenleme:
risolto dichiarando le variabili halkı.

Sözcükler kodu Cumhuriyetçi modül sınıfıflör
Public ointeraction as etkileşimevents
public omouse as fareevents
Public odrawdoc as çizimdocument
public oactivesheet as page
public o generalnotes as generalnotes
Kalıcıgeometri olarak
public stext as string
public o generalnote as generalnote
Halk çiftliği olarak
public dxcoord as double
public ostyle as textstyle
Public odoc as çizimdocument
end modülü


alt ana()
Ointeraction = thisapplication.commandmanager.createinteractionevents
omouse = ointeraction.mouseevents
Addhandler omouse.onmouse display, addressof omouse_onmousedown
Ointeraction.start

Sonunda alt alt

Sub omouse_onmousedown (button as mousebuttonenum, switchkeys as changestateenum, modelposition as point2d, view as mucit.view)
parametre.update afterchange = true

Odrawdoc = buapplication.activedocument

“ Aktif sayfaya bir referans ayarlayın.

Oaktif tablo = odrawdoc.aktif tablo

“Genel nesnelere bir referans ayarlayın

O genel notlar = oaktif tablo.drawingnotes. genel notes


Og = buapplication.transientgeometry.

dycoord = modelleme.y
dxcoord = modelleme.x

Odoc = buapplication.activedocument
Ostyle = odoc.stylesmanager.textstyles.item ("premontaggio")

O genel note = o generalnotes.addfized(otg.createpoint2d(dxcoord, dycoord), parametre ("premontaggio") ostyle)

parametre ("premontaggio") = parametre ("premontaggio") + 1
Sonunda alt alt
 
ciao % 1,
ilogics kodu (base, orta, uzman) yönetimi ile ilgili deneyim tabanınız nedir?

Orijinal ilogic koduna bazı “en iyiler” yaptım, temel bir hata kontrolü ekledim, kamu değişkenlerinin kullanımını kaldırdı (benim görüşüm gerekli değil) ve mucitin en son sürümü ile test edildi(2024).
Kod:
alt ana()
dim ointeractionevents = buapplication.commandmanager.createinteractionevents
dim omouse as mouseevents = ointeraction.mouseevents
Addhandler omouse.onmouse display, addressof omouse_onmousedown
Ointeraction. start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start
Sonunda alt alt

Özel sub omouse_onmousedown (amaton as mousebuttonenum, değişimkeys as changestateenum, modelposition as point2d, view as mucit.view)
Deneyin
Odoc = buapplication.activedocument
Eğer buapplication.activedocument.documenttype.equals(documentobject) O zaman sonra
ilerlemeivo = parametre.param ("premontaggio")

Opoint = buapplication.transientgeometry.createpoint2d(modelposition.x, modelposition.y)

Ostyle = odoc.stylesmanager.textstyles.item (progressivo.name)

Odoc.activesheet.drawingnotes. generalnotes.addfized(opoint, ilerlemeivo.value, ostyle)

parametre.update afterchange = true

İlerleme = ilerlemeivo.value + 1
Sonunda, eğer sona erirse
Sistem olarak err yakalamak. istisna istisna istisna istisna istisna istisna istisna istisna istisna istisna
Mesajbox.show(err.message)
Sonunda deneyin
Sonunda alt alt
 
ciao % 1,
ilogics kodu (base, orta, uzman) yönetimi ile ilgili deneyim tabanınız nedir?

Orijinal ilogic koduna bazı “en iyiler” yaptım, temel bir hata kontrolü ekledim, kamu değişkenlerinin kullanımını kaldırdı (benim görüşüm gerekli değil) ve mucitin en son sürümü ile test edildi(2024).
Kod:
alt ana()
dim ointeractionevents = buapplication.commandmanager.createinteractionevents
dim omouse as mouseevents = ointeraction.mouseevents
Addhandler omouse.onmouse display, addressof omouse_onmousedown
Ointeraction. start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start start
Sonunda alt alt

Özel sub omouse_onmousedown (amaton as mousebuttonenum, değişimkeys as changestateenum, modelposition as point2d, view as mucit.view)
Deneyin
Odoc = buapplication.activedocument
Eğer buapplication.activedocument.documenttype.equals(documentobject) O zaman sonra
ilerlemeivo = parametre.param ("premontaggio")

Opoint = buapplication.transientgeometry.createpoint2d(modelposition.x, modelposition.y)

Ostyle = odoc.stylesmanager.textstyles.item (progressivo.name)

Odoc.activesheet.drawingnotes. generalnotes.addfized(opoint, ilerlemeivo.value, ostyle)

parametre.update afterchange = true

İlerleme = ilerlemeivo.value + 1
Sonunda, eğer sona erirse
Sistem olarak err yakalamak. istisna istisna istisna istisna istisna istisna istisna istisna istisna istisna
Mesajbox.show(err.message)
Sonunda deneyin
Sonunda alt alt
Merhaba, üssü söylüyorum. Bu nasıl bir i-olojik kural eklemek ve gitmesine izin vermek. parametreyi "premontage" adı ile bulamadığını söyleyen bir hata alıyorum. Anladığım şeyden, editörlerin stiline eklemek zorundayım. Kodta zaten editörümde bulunan stillerden biri ile bir araya geldim. Ama yine de işe yaramıyor. Hatam nerede?
 
Orijinal kodda stili ve parametre aynı adı ("preassembly") vardır, stile ek olarak parametre mevcut olmalıdır.
Küçük bir değişiklikle, parametre kural yürütme ile eklenebilir.
 

Forum İstatistikleri

Konular
58,521
Mesajlar
499,056
Kullanıcılar
104,110
Son Üye
ChristianR

Çevrimiçi Üyeler

Şu anda çevrimiçi üye yok.
Geri
Üst