Yazı Açısına 100 Grad Ekleme Makrosu(Text Angle Adjustment Macro by Adding 100 Grad)

netcad-100grad-ekle

sabangul67@gmail.com
Mayıs 17, 20253 dk okuma2 görüntülenme

NetCAD ile Yazı Açısını 100 Grad Artıran VBScript Makrosu: Hızlı ve Pratik Çözüm!

Boost Your NetCAD Projects with This VBScript Macro to Add 100 Grad to Text Angles – Fast and Efficient!


Bu makro, NetCAD yazılımında seçilen yazı objelerinin açısını 100 grad artırarak düzenlemenizi sağlar. 📝 Kullanıcı dostu bir seçim işlemiyle, yazıları tek tek seçip açılarını hızlıca günceller. Özellikle harita, plan veya teknik çizimlerde yazı yönlerini standardize etmek isteyen mühendisler ve tasarımcılar için ideal bir araçtır. Makro, seçilen yazının orijinal metnini korur, sadece açısını değiştirir ve çizim ekranını yenileyerek sonucu anında gösterir. 🚀 Bu otomasyon, manuel düzenlemelere kıyasla zaman tasarrufu sağlar ve projelerinizde profesyonel bir dokunuş sunar.

This macro allows you to increase the angle of selected text objects in NetCAD by 100 grad. 📝 With a user-friendly selection process, it lets you pick texts and update their angles quickly. Perfect for engineers and designers looking to standardize text orientations in maps, plans, or technical drawings. The macro preserves the original text content, modifies only the angle, and refreshes the drawing screen to display results instantly. 🚀 This automation saves time compared to manual edits and adds a professional touch to your projects.


Nasıl Çalışır (How Does It Work)

Makro, NetCAD ortamında çalışır ve şu adımları izler:

Güncelleme ve Yenileme: Yeni açıyla yazı objesi güncellenir, çizim ekranına işlenir ve ekran yenilenir. 🔄
Bu süreç, her bir yazı için tekrarlanır ve işlem tamamlandığında tüm objeler serbest bırakılır. Makro, NetCAD’in kendi komutlarını kullanarak sorunsuz bir entegrasyon sağlar.

Seçim İşlemi: Kullanıcıdan bir yazı objesi seçmesi istenir. 🖱️

Obje İşleme: Seçilen her yazı objesinin referans noktası alınır ve mevcut açısı okunur.

Açı Hesaplama: Mevcut açı grad cinsine çevrilir, üzerine 100 grad eklenir ve yeni açı radyan cinsine dönüştürülerek yazıya uygulanır. 📏

This macro operates within NetCAD and follows these steps: Selection Process: Prompts the user to select a text object. 🖱️ Object Processing: Retrieves the reference point and current angle of each selected text. Angle Calculation: Converts the current angle to grad, adds 100 grad, and converts the new angle back to radians for application. 📏 Update and Refresh: Updates the text object with the new angle, renders it on the drawing screen, and refreshes the display. 🔄 This process repeats for each text, and upon completion, all objects are released. The macro integrates seamlessly using NetCAD’s native commands.


Etiket ( Labels )

Türkçe

İngilizce


📝 Netcad NVB Code

VB
Sub Main
Dim ss,oyazi,bd,yazi,orjinal,o,i,index,tabaka,yb,aci,refp
  with Netcad
     set ss = .newselectionset   'Anlık Seçim objesi Oluşturuldu.
     set oyazi=.newobject

    ss.select "Yazıyı Gösteriniz...",array(otext) ' Obje Seçme İşlemi
    for i=0 to ss.ne-1
       'netcad.netcadcommand "REGEN"
    o=ss.getselectedobject(i,oyazi)
    oyazi.flags = 4
   set refp = .newc (0,0,0)
   set refp = .GetTextRefPoint (oyazi)

    .drawobject oyazi,4 '32 ' Seçilen yazıyı geçici olarak silinmiş gibi çiz.
    oyazi.flags=0
    orjinal = oyazi.s
    aci=oyazi.angle

    'set bd = .newbdialog ("Yazı Değiştirme İşlemi")
    '    bd.getstring "yazi","Yazının Metni =",orjinal,100
    '    bd.showmodal

    '    yazi = bd.valuebyname ("yazi")
    'if yazi = "" then yazi=orjinal
    '    oyazi.s = yazi
    aci=aci*63.66197725
 aci = aci + 100 
    aci=aci*0.015707963
    oyazi.angle = aci
        .putobject o,oyazi
        .drawobject oyazi,-1
       next
       netcad.netcadcommand "REGEN"
  end with
        ss.redrawandrewind
  set i=nothing
  set o=nothing
  set orjinal = nothing
  set yazi = nothing
  set bd = nothing
  set oyazi = nothing
  set ss = nothing

End Sub
VB

netcad-100grad-ekle

Yazar

sabangul67@gmail.com

Bu yazarın yayınladığı diğer içerikleri inceleyebilirsiniz.

Tüm yazıları