jenuary
Guest
con la speranza di ve cosa gradita, qui sotto riporto la "sub main" modificata da sovrascrivere nella makro,Gerçekten büyük bir makro... Bunu kullandığım her zaman mutlu olmayı bırakmıyorum!
Son zamanlarda, klasörlerim arasında kaydettiğim belirli bir dxf haritasına göre dxf'ye ihracat yapma şansım olmasını istedim. Makro dosyayı değiştirmeye çalıştım ama gerekli becerilerim yok. Aşağıdakileri ekleyebileceğiniz belirli haritalara göre ihracatın dxf'e uygulanmasını okudum:
Bir haritalama dosyası kullanılmış, sağlam işler her bir başarı kurtarma için kullanmaya devam edecektir.
Bu seçeneği takas ederek api'de etkinleştirebilirsiniz.setuserpreferencetoggle(swuserpreferencetoggle_e.swdxfmapping, true)
and you can define the road to the mapping file by exchangep.setuserpreferencestringlistvalue(swuserpreferencestringlistvalue_e.swdxfmappingfiles, "<path file="" mapping="" to="" your="">" " ""
Ne yapmak istediğinizi anlıyorum, ama iki komut hattını ve hangi noktada eklemeyi bilmiyorum. Ayrıca, yeni değişkenlerin tipoloji ile ilan edilmesi gerektiğine inanıyorum. .
Jenuary, bana bir el verebilir misin, lütfen?</path>
Verde trovi i commenti e le spiegazioni per le righe aggiunte, se non è chiaro fammi anestezi:
alt ana()
dim, işleri mahvediyor. sldworks
dim swmodel as sldworks.modeldoc2
dim swassy as sldworks.assemblydoc
dim swconf as sldworks setting.uration
dim swrootcomp as sldworks.component2
dim nstart as single
dim bret as boolean
Ayarlama = uygulama. sldworks
swmodel = exchangep.activedoc
swconf = swmodel.getactive
swrootcomp = swconf.getrootcomponent3 (gerçek)
Debug.print "file = " & swmodel. Getpathname
" "" " "" " "" " " "" " " "" " " " " " " "" " " " "" " " " "" " " " "" " " "" " " "" " " "" " " "" " " "" " " "" " " "" " "" " "" " "" " " "" " " "" " "" "" " " "" " "" " "" " "" "" " "" "" "" " "" "" "" " "" " "" "" "" "" " "" "" "" "" "" "" "" " "" "" "" "" "" "" """ "" """ "" "" "" "" " """""" " " " " """"" """ "" "" " " " " " " " " " "" " """"""" " " " """ """""""" "" " " " " " " """""""""""""""""
" "" " "" " "" " " "" " " "" " " " " " " "" " " " "" " " " "" " " " "" " " "" " " "" " " "" " " "" " " "" " " "" " " "" " "" " "" " "" " " "" " " "" " "" "" " " "" " "" " "" " "" "" " "" "" "" " "" "" "" " "" " "" "" "" "" " "" "" "" "" "" "" "" " "" "" "" "" "" "" """ "" """ "" "" "" "" " """""" " " " " """"" """ "" "" " " " " " " " " " "" " """"""" " " " """ """""""" "" " " " " " " """""""""""""""""
İhracat için ayar alanı dxf-dwg
‘ ‘ ‘
“Bu kod parçası ayarları dayattı çünkü sağlam işler bana göstermiyor
"Her kurtarma dwg\dxf Haritalama set maskedim bshowmap as boolean
"Kayıt dosyasını kullanarakbshowmap = takas.getuserpreferencetoggle(swuserpreferencetoggle_e.swdxfdontshowmap)
bshowmap = false o zaman bshowmap = gerçek başka bshowmap = gerçek gerçek
exchangep.setuserpreferencetoggle swuserpreferencetoggle_e.swdxfdontshowmap, false ‘ ‘ ‘ Bu bölüm isteğe bağlı, önceden ayarlandığında haritalama dosyasını değiştirmeden önce,
“ Haritalama dosyasının dizesini değişken olarak kaydedin, böylece makro makro sonunda sıfırlanabilirdim old_mapping_file as string
Eski_mapping_file = exchangep.getuserpreferencestringlistvalue(swdxfmappingfiles) " mi ritorna ad esempio "c:\mio_file.dat" ‘ ‘ ‘
“Şimdi haritalama dosyasının işaret dizesine adım at
“Beyaztan önce, ben.e. kapıVersionp.setuserpreferencestringlistvalue swuserpreferencestringlistvalue_e.swdxfmappingfiles, "" Beyaz haritalama dizeleri
“Şimdi, sağlam işlerin sonraki kurtarmalar için atıfta bulunması gereken haritalama dosyasını uyguladı.Versionp.setuserpreferencestringlistvalue swuserpreferencestringvalue_e.swdxfmappingfiles, "c:\...\mia_mappatura.dat" ‘Kayıt dosyasını ortaya çıkardı
“Hareketli dize ile birlikte, tasarruf sırasında seçeneklerin altında bulduğumuz perdeyi kontrol edin dxf\dwg I have to passdown line indexVersionp.setuserpreferenceintegervalue swuserpreferenceintegervalue_e.swdxfmappingfileindex, 0 0 0 0 "O zaman listedeki ilkim 0
‘ ‘ ‘ Bu komut isteğe bağlı, kurtarma versiyonunu ayarlamaya gidiyorumVersionp.setuserpreferenceintegervalue swuserpreferenceintegervalue_e.swdxfvers, 3 İhracatın serbest bırakılmasına izin verdi "es.r2000-2002"
‘ ‘ ‘
"Bitiş için yer alan tanımlayın dxf-dwgtraversecomponent swrootcomp, 1
Bu iki sırayı bitirmek, ilk haritalama dosyasını restore etmektirVersionp.setuserpreferencestringlistvalue swuserpreferencestringlistvalue_e.swdxfmappingfiles, ""
Versionp.setuserpreferencestringlistvalue swuserpreferencestringlistvalue_e.swdxfmappingfiles, old_mapping_files ‘Kayıt dosyasını ortaya çıkardı
" "" " "" " "" " " "" " " "" " " " " " " "" " " " "" " " " "" " " " "" " " "" " " "" " " "" " " "" " " "" " " "" " " "" " "" " "" " "" " " "" " " "" " "" "" " " "" " "" " "" " "" "" " "" "" "" " "" "" "" " "" " "" "" "" "" " "" "" "" "" "" "" "" " "" "" "" "" "" "" """ "" """ "" "" "" "" " """""" " " " " """"" """ "" "" " " " " " " " " " "" " """"""" " " " """ """""""" "" " " " " " " """""""""""""""""
" "" " "" " "" " " "" " " "" " " " " " " "" " " " "" " " " "" " " " "" " " "" " " "" " " "" " " "" " " "" " " "" " " "" " "" " "" " "" " " "" " " "" " "" "" " " "" " "" " "" " "" "" " "" "" "" " "" "" "" " "" " "" "" "" "" " "" "" "" "" "" "" "" " "" "" "" "" "" "" """ "" """ "" "" "" "" " """""" " " " " """"" """ "" "" " " " " " " " " " "" " """"""" " " " """ """""""" "" " " " " " " """""""""""""""""msgbox ("export tamamlandı!")
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