motee-z Posted February 11, 2023 Posted February 11, 2023 (edited) Hello friends i have a lot of triangles every triangle is a 3d face i need help to automatic label the head of a 3d face with its elevation any help will be appreciated sample.dwg Edited February 11, 2023 by motee-z attached sample 1 Quote
devitg Posted February 11, 2023 Posted February 11, 2023 (edited) 4 minutes ago, motee-z said: Hello friends i have a lot of triangles every triangle is a 3d face i need help to automatic label the head of a 3d face with its elevation any help will be appreciated Please upload your sample.dwg with a before and after Edited February 11, 2023 by devitg need to change Quote
motee-z Posted February 11, 2023 Author Posted February 11, 2023 sample has been attached above Quote
Tharwat Posted February 11, 2023 Posted February 11, 2023 Something like this ? (defun c:Test (/ int sel ent get pts ins ) ;;----------------------------------------------------;; ;; Author : Tharwat Al Choufi ;; ;; website: https://autolispprograms.wordpress.com ;; ;;----------------------------------------------------;; (and (princ "\nSelect 3DFACE objects to label : ") (setq int -1 sel (ssget '((0 . "3DFACE")))) (while (setq int (1+ int) ent (ssname sel int)) (setq get (entget ent)) (foreach ass '(10 11 12) (setq ins (cdr (assoc ass get))) (or (vl-some '(lambda (u) (equal u ins 1e-4)) pts) (and (setq pts (cons ins pts)) (entmake (list '(0 . "TEXT") '(8 . "Elevation") '(62 . 1) (cons 10 ins) '(40 . 1.0) (cons 1 (rtos (caddr ins) 2 2)) '(50 . 0.0) '(41 . 1.0) '(51 . 0.3) '(7 . "Standard") (cons 11 (list 0.0 0.0 (caddr ins))) ) ) ) ) ) ) ) (princ) ) 1 Quote
devitg Posted February 11, 2023 Posted February 11, 2023 1 hour ago, motee-z said: sample has been attached above Find attached lisp and dwg 3d-face-elev.LSP 3dface-sample-after.dwg 3dface-sample-before.dwg Quote
motee-z Posted February 11, 2023 Author Posted February 11, 2023 thank you tharwat your code working well but i am looking for faster result if can be also thanks to mr devitg for his lisp i think there is something missing in the code it gave Command: 3DF$ ; error: bad argument type: lselsetp nil Command: Quote
BIGAL Posted February 11, 2023 Posted February 11, 2023 "I am looking for faster result " I tested on your sample dwg and its almost instant can not get much faster. Quote
devitg Posted February 12, 2023 Posted February 12, 2023 1 hour ago, motee-z said: 1 hour ago, motee-z said: also thanks to mr devitg for his lisp i think there is something missing in the code it gave Command: 3DF$ ; error: bad argument type: lselsetp nil Command: Please give a new try 3d-face-elev-01.LSP Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.