kırmızı renkli ve çizgi tipi ölçeği 1

AutoCAD'de kırmızı renkli ve çizgi tipi ölçeği 1 olan çizgileri bulmak istiyorsanız basit bir AutoLISP programı oluşturabilirsiniz. Program, çizimdeki tüm objeleri yineleyecek ve kriterlerinizi karşılayan çizgileri belirleyecektir. (defun c:FindRedLines () (vl-load-com) (setq redLines '()) ; List to store red lines (vlax-for obj (vla-get-ActiveDocument (vlax-get-acad-object)) (if (= "AcDbLine" (vla-get-objectname obj)) ; Check if the entity is a line (progn (setq color (vla-get-color obj)) (setq linetype-scale (vla-get-linetype-scale obj)) ; Check if the line is red and linetype scale is 1 (if (and (= color 1) (= linetype-scale 1.0)) (setq redLines (cons obj redLines)) ) ) ) ) ; Highlight or process the red lines as needed (if redLines (progn (foreach line redLines ; Do something with each red line (e.g., highlight or print information) (vla-put-color line 2) ; Change color to yellow for example ) (princ (strcat "\nFound " (itoa (length redLines)) " red lines.")) ) (princ "\nNo red lines found.") ) (princ) ) ; Call the function when the AutoLISP program is loaded (c:FindRedLines)

Yorumlar

Bu blogdaki popüler yayınlar

AUTOLISP DOSYALARININ KALICI KULLANIMI

AUTOLISP PROGRAMLARINI ÇALIŞTIRMAK

MS Access Veritabanı Tablosuna Visual Basic ile Veri Eklemek