Adahm
Guest
Eğer bir çok seviyeli setin bir kısmını vsa seçebilirseniz herkes biliyor mu?
ilogic ile . Aşağıdaki sözcülerle komut seçin:
Odocdef.selectset.select (oocc)
Odocdef, axieme ve oocc, seçilmiş olmak için bir eksenin bileşenidir.
Ama iki sorun var.
Kullandığım kod aşağıdaki gibidir:
Benim durumumda sadece belirli özelliklere sahip parçalar var, ama bu bir detay.
İki test yapmak için birine sahip olmayanlar için küçük bir örnek ekleyin.
Birlikte dosyada001 zaten yukarıda gösterilen kod var.
Dosya versiyonu: mucit 2023.
Teşekkür ederim.
ilogic ile . Aşağıdaki sözcülerle komut seçin:
Odocdef.selectset.select (oocc)
Odocdef, axieme ve oocc, seçilmiş olmak için bir eksenin bileşenidir.
Ama iki sorun var.
- vsa’daki aynı komutu bulamazım
- Komut sadece ilk seviyedeki bileşenleri seçer.
Kullandığım kod aşağıdaki gibidir:
Kod:
syntaxeditor code snippetsub main()
dim assydoc as assemblydocument
dim compdef as componentdefinition
dim compoccurrence as componentoccurrence
Assydoc = buapplication.activedocument
‘ aktif bir axieme’den keşif
Kefiller (assydoc.componentdefinition)
end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end
“Geçmiş fonksiyon bileşenlerinin hiyerarşisini araştırmak için
Alt sorgulamak (kompdef as componentdefinition)
dim i as Full
i = 1 to compdef.occurrences.count
Eşdeğerlik = kodef.occurrences.item(s)
Eğer bilakir.definitiondocumenttype = 12291 o zaman 'komponentdefinition sonra
“Eğer tanımlı bir bileşen varsa (başka bileşenler içeriyor)
Sorgulayıcılar (kompoccurrence.definition)
" messagebox.show("part seçildi: " & compoccurrence.name)
Bölümler (compdef, compoccurrence)
Sonunda, eğer sona erirse
Bir sonraki i
end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end
sub partselection (odef, oocc)
dim odocdef belge olarak
Odocdef = odef.document
dim odococc belge olarak
Odococc = oocc.definition.document
dim opropset as propertyset
Opropset = odococc.propertysets.item ("inventor kullanıcı tanımlanmış özellikleri")
dim oprop as [Property]Hatada bir sonraki sefere devam ediyor
Oprop = opropset.item ("foratura")
Eğer oprop.value = "sovo" o zaman
Odocdef.selectset.select (oocc)
Sonunda, eğer sona erirse
Sonunda alt alt
İki test yapmak için birine sahip olmayanlar için küçük bir örnek ekleyin.
Birlikte dosyada001 zaten yukarıda gösterilen kod var.
Dosya versiyonu: mucit 2023.
Teşekkür ederim.