Objenin Tabakasını Sorgulama Makrosu (Object Layer Query Macro)

netcad-tabaka-ad-sorgula

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

🔍 Netcad\’de Obje Tabakasını Hızlıca Sorgulayın: Pratik ve Kullanışlı Makro!

🔍 Quickly Query Object Layers in Netcad: Practical and User-Friendly Macro!


Bu makro, Netcad yazılımında seçilen bir objenin tabaka adını ve tabaka ID\’sini hızlıca sorgulamanızı sağlar. Kullanıcı dostu bir arayüzle, seçtiğiniz objenin tabaka bilgilerini bir mesaj kutusu (msgbox) aracılığıyla görüntüler. Ayrıca, makro seçilen objeyi geçici olarak vurgulayarak görsel bir geri bildirim sunar. Özellikle büyük projelerde, objelerin hangi tabakada olduğunu hızlıca anlamak isteyen Netcad kullanıcıları için zaman kazandıran bir araçtır. Makro, esnek yapısıyla farklı projelerde kolayca kullanılabilir ve tabaka yönetimini daha verimli hale getirir.

This macro allows you to quickly query the layer name and layer ID of a selected object in Netcad software. With a user-friendly interface, it displays the layer information of the selected object through a message box (msgbox). Additionally, the macro temporarily highlights the selected object, providing visual feedback. It is a time-saving tool for Netcad users who need to identify the layer of objects in large projects. With its flexible structure, the macro can be easily used in various projects, making layer management more efficient.


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

Makro, Netcad ortamında çalışır ve aşağıdaki adımları izler:

  1. Seçim İşlemi: Kullanıcıdan bir obje seçmesi istenir. Netcad’in anlık seçim özelliği kullanılarak, kullanıcı \”Tabakası Sorgulanacak Obje Seçiniz\” mesajıyla yönlendirilir.
  2. Obje Bilgisi Alma: Seçilen objenin ilk elemanı alınır ve bu objenin tabaka bilgileri sorgulanır.
  3. Bilgi Gösterme: Objenin tabaka adı ve ID’si, bir mesaj kutusunda kullanıcıya sunulur.
  4. Görsel Vurgu: Seçilen obje, Netcad ekranında geçici olarak çizilerek vurgulanır, böylece kullanıcı hangi objeyi seçtiğini net bir şekilde görür.
  5. Tekrarlama: Kullanıcı, başka bir obje seçene kadar bu işlemi tekrarlayabilir.

Makro, Netcad’in VBScript dilinde yazılmıştır ve Netcad’in yerleşik fonksiyonlarını kullanarak tabaka bilgilerini hızlıca çeker. Kod, kullanıcı dostu bir deneyim sunmak için sade ve etkili bir şekilde tasarlanmıştır.

This macro operates within the Netcad environment and follows these steps:

  • Selection Process: The user is prompted to select an object. Using Netcad’s instant selection feature, the user is guided with the message \”Select the Object to Query Its Layer.\”
  • Object Information Retrieval: The first element of the selected object is retrieved, and its layer information is queried.
  • Information Display: The object’s layer name and ID are displayed to the user in a message box.
  • Visual Highlight: The selected object is temporarily drawn on the Netcad screen, highlighted for clarity, so the user can clearly see which object was selected.
  • Repetition: The user can repeat this process by selecting another object.
  • The macro is written in Netcad’s VBScript language and uses Netcad’s built-in functions to quickly retrieve layer information. The code is designed to be simple and effective, ensuring a user-friendly experience.

Etiket ( Labels )

Netcad makro, tabaka sorgulama, obje tabakası, VBScript makro, Netcad otomasyon, CAD araçları

Netcad macro, layer query, object layer, VBScript macro, Netcad automation, CAD tools


📝 Netcad NVB Code

VB
'Amaç: Objenin Tabakasının Adını Verir.
SUB Main
DIM o,ss ,uz
With netcad
    set ss = .NewSelectStatus   ' Anlik Secim objesi yarat
    while .SelectObjectInstant ("Tabakası Sorgulanacak Obje Seçiniz",1,array(),ss)  ' obje sec
      set o = ss.objects(0)    ' Secim objesinin ilk objesini al.
          msgbox  .layernameof (o.tabaka)  & chr(13) & "id =" & o.tabaka  &"" ,32,"Seçilen Obje Tabakası"
          'uz = o.length (0) 'Yorumlanmış satır: Obje uzunluğunu hesaplar (kullanılmıyor)
          'msgbox formatnumber (uz,2) 'Yorumlanmış satır: Uzunluğu mesaj kutusunda gösterir
          .drawobject o,-1 'Seçilen objeyi geçici olarak vurgular
    wend
  End With
END SUB
VB

netcad-tabaka-ad-sorgula

Yazar

sabangul67@gmail.com

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

Tüm yazıları