Jonathan Handojo Posted June 4, 2020 Posted June 4, 2020 Hi again all, I'm just wondering if anyone has a LISP program that works using GrText or any other sort that, when a cursor crosses over an object, displays the layer that object is on next to the cursor. Thanks, Jonathan Handojo Quote
hanhphuc Posted June 4, 2020 Posted June 4, 2020 FWIW - vanilla LISP 3 hours ago, Jonathan Handojo said: Hi again all, I'm just wondering if anyone has a LISP program that works using GrText or any other sort that, when a cursor crosses over an object, displays the layer that object is on next to the cursor. Thanks, Jonathan Handojo i've seen Lee has such grtext demo GIF but couldn't find it. how if overlapped, nested objects etc.. my attempt just simple ssget concept, you may need to download LM's GRTEXT else Layer name displays in command line. (defun c:foo (/ vs os ap k pt ss en e $ & p) (defun vs (x) (* (/ (getvar 'viewsize) (cadr (getvar 'screensize))) x)) (mapcar '(lambda (a b)(set a (getvar b))) '(os ap) '(osmode aperture)) (setvar 'osmode 0) (setq & "\r ") (terpri) (while (and (setq k (grread t 13 0)) (= (car k) 5)) (redraw) (if (and (setq p (vs ap) ss (ssget "_C" (setq pt (cadr k)) (mapcar '+ pt (list (- p) p)))) (setq en (ssname ss 0) e (entget en)) (setq $ (cdr(assoc 8 e))) ) (if (and LM:GrText LM:DisplayGrText) (LM:DisplayGrText pt (LM:GrText $) 3 15 -31 ) (princ (strcat "\rLayer: " $)) ) (princ (setq $ &)) ) (princ) ) (redraw) (setvar 'osmode os) (princ) ) 1 Quote
dlanorh Posted June 4, 2020 Posted June 4, 2020 Attached is lisp I think you are after. DInfoV1-5.lsp 1 Quote
Dadgad Posted June 4, 2020 Posted June 4, 2020 (edited) 4 hours ago, steven-g said: Rollovertips=1 BINGO! Rollovertips has got you covered. If you go into your CUI and care to, you can define which of the available General Properties you care to display in the Rollover Tip, check those you want. If you are too lazy to remember the name of the system variable it is also available in OPTIONS, on the DISPLAY tab. Additionally, the LEE-MAC lisp to which dlanorh supplied the link will, of course since Lee Mac wrote it, do even more! Thanks Lee! When in doubt, check Lee Mac out! Edited June 4, 2020 by Dadgad typo Quote
Jonathan Handojo Posted June 4, 2020 Author Posted June 4, 2020 (edited) In this case, hanhphuc provided the best solution that I'm after. I'm basically working with thousands of entangled lines and I just need to know where they sit, so that I can use other LISP routines to change them to the layers that I need to. Using a rollover seems to take time and the slightest move of the mouse will make it disappear. It doesn't somehow seem user-friendly if you're a fast worker. Not to say the least, the code provided by dlanorh also works, but is somehow very slow in my computer. ssget is a brilliant idea, didn't cross my mind there. Thanks hanhphuc. With this as a start, I can then organise which layers are prior to display first compared to others (for example, if two objects are overlapping the cursor). Edited June 4, 2020 by Jonathan Handojo Quote
hanhphuc Posted June 4, 2020 Posted June 4, 2020 5 hours ago, Jonathan Handojo said: In this case, hanhphuc provided the best solution that I'm after. I'm basically working with thousands of entangled lines and I just need to know where they sit, so that I can use other LISP routines to change them to the layers that I need to. Using a rollover seems to take time and the slightest move of the mouse will make it disappear. It doesn't somehow seem user-friendly if you're a fast worker. Not to say the least, the code provided by dlanorh also works, but is somehow very slow in my computer. ssget is a brilliant idea, didn't cross my mind there. Thanks hanhphuc. With this as a start, I can then organise which layers are prior to display first compared to others (for example, if two objects are overlapping the cursor). no worries, credits to Lee Mac i recall Lee's GIF demo (it was not Dinfov.5.lsp), IIRC it was showing a "T" while cursor hovers over objects, it inspired ideas. grtext (transient) is smoother, not sure entmod slow IMO entity holds dxf data/properties, eg: color or background mask etc.. another tweak - checker (by adjusting aperture color/size) p/s: nice DinfoV1.5.lsp beaten me decades ! BCAD has TOOLTIPS too, but normally switched OFF 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.