Yazı Objesi 200 Grad Döndürme Makrosu (Text Object 200 Grad Rotation Macro)

netcad-200grad-ekle

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

Yazı Objelerini 200 Grad Döndüren Pratik Çözüm 🚀

Practical Solution to Rotate Text Objects by 200 Grad


Bu makro, NetCAD ortamında seçilen yazı objelerini 200 grad (gradyan) döndürmek için tasarlanmıştır. Kullanıcı dostu bir şekilde, seçilen yazıları otomatik olarak algılar, orijinal metin içeriğini korur ve belirtilen grad açısında döndürme işlemini gerçekleştirir. Makro, NetCAD\’in yerleşik komutlarını kullanarak yazıların açısını değiştirir ve ekranı yenileyerek sonucu anında gösterir. Özellikle harita düzenlemelerinde veya teknik çizimlerde yazıların yönünü hızlıca ayarlamak için idealdir. 🗺️

This macro is designed to rotate selected text objects by 200 grad (gradians) in the NetCAD environment. It user-friendly detects selected texts, preserves the original text content, and performs the rotation at the specified grad angle. The macro uses NetCAD\’s built-in commands to modify the text angle and refreshes the screen to display the result instantly. It is ideal for quickly adjusting text orientation in map editing or technical drawings.


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

Seçim İşlemi: Kullanıcıdan yazı objesini seçmesi istenir. Seçim, NetCAD\’in seçim seti (selection set) aracılığıyla yapılır.
Referans Noktası: Yazının referans noktası alınır ve geçici olarak silinmiş gibi çizilir.
Açı Hesaplama: Yazının mevcut açısı alınır, 200 grad dönüş uygulanır. Açı, NetCAD\’in radyan-grad dönüşüm katsayısına göre hesaplanır.
Güncelleme: Yeni açı yazıya uygulanır ve obje NetCAD ortamına geri yazılır.
Ekran Yenileme: İşlem sonunda ekran yenilenir ve döndürülmüş yazı görünür hale gelir.

  • Selection Process: The user is prompted to select a text object. The selection is made through NetCAD\’s selection set.
  • Reference Point: The reference point of the text is retrieved, and the text is temporarily drawn as if deleted.
  • Angle Calculation: The current angle of the text is obtained, and a 200-grad rotation is applied. The angle is calculated based on NetCAD\’s radian-grad conversion factor.
  • Update: The new angle is applied to the text, and the object is rewritten to the NetCAD environment.
  • Screen Refresh: The screen is refreshed at the end of the process, making the rotated text visible.


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
        if aci<200 then aci = aci + 200 else aci = aci - 200
    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-200grad-ekle

Yazar

sabangul67@gmail.com

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

Tüm yazıları