mjab8 Posted June 16, 2018 Posted June 16, 2018 Anyone can help me on my earlier question on preset attribute visibilities? Quote
dlanorh Posted June 16, 2018 Posted June 16, 2018 Yes, it's possible, but would involve a lot more work to program it. Quote
mk4176 Posted June 18, 2018 Posted June 18, 2018 Hello dlanorh, Works like a charm. Thank you very much for your help. Quote
mk4176 Posted June 27, 2018 Posted June 27, 2018 (edited) There are many lisps to turn off an attribute, just by clicking on it. Can Any one modify the am2 lisp, so turning on an attribute would happen by clicking on it, not by naming it in the lisp code? I mean, when I pick a block, all the attributes with "off state" would be turned on, after clicking on one attribute, it stays on, and all others got back to "off" state. I attached a video to demonstrate. Any help is appreciated. 2019-05-06_193447.mp4 Edited May 6, 2019 by mk4176 Quote
Tomohdi Posted November 9, 2023 Posted November 9, 2023 Dears, I have the same issue in the attached files. I shared two files: the original CAD file I got from processing software and the other one I should get. The original cad file has many blocks with three attribute tags( POINT_NUMBER, DESCRIPTION, and ELEVATION). I need Lisp or Routine first. I need to rename them as (Point, Code, and Height). Then, I need to select the bouch of the same block and choose any Tag to Hide or Unhide. Also, I need to change the Height of the text and rotate and align it with the line, polyline, or carve. I would be grateful if you could help me with this. 3026.dwg 3026-orginal.dwg Quote
BIGAL Posted November 9, 2023 Posted November 9, 2023 (edited) I seem to recall did the visibilty bit as a global routine pick a block and showed visibility in a toggle dcl showing on/off. Turning all off attributes back to on can be done. I will try to find. Same idea with renaming tagnames, you can bedit the block definition just using Properties and change tagname, for 3 really its quick compared to writing code. Edited November 9, 2023 by BIGAL Quote
BIGAL Posted November 10, 2023 Posted November 10, 2023 (edited) Try this bit busy at moment version 2 would display current visibilty. Make sure you save Multi toggles in a search path or edit teh load to include full path. (defun c:blkvisoff ( / x k ss obj lst lst2 atts att) (setq blkname (cdr (assoc 2 (entget (car (entsel "\nPick a block for atts invisible ")))))) (setq ss (ssget "_X" '((0 . "INSERT") (cons 2 blkname)(66 . 1)))) (setq obj (vlax-ename->vla-object (ssname ss 0))) (setq atts (vlax-invoke obj 'Getattributes)) (setq lst '()) (foreach att atts (setq lst (cons (vlax-get att 'tagstring) lst)) ) (setq lst (cons "Select toggle for on " lst)) (if (not AH:Toggs)(load "Multiple toggles.lsp")) (setq ans (reverse (ah:toggs (append '("Select toggle for on ") lst)))) (setq lst2 '()) (setq K 0) (foreach tagn lst (setq lst2 (cons (list tagn (nth k ans)) lst2)) (setq k (1+ k)) ) (repeat (setq x (sslength ss)) (setq obj (vlax-ename->vla-object (ssname ss (setq x (1- x))))) (setq atts (vlax-invoke obj 'Getattributes)) (foreach tagn lst2 (setq k 0) (foreach att atts (if (= (car tagn) (vlax-get att 'tagstring)) (progn (if (= (cadr tagn) "1") (princ "on") (vlax-put att 'invisible -1) ) (setq k (1+ k)) ) ) ) ) ) (princ) ) The issue of readability of points has been discussed so many times, 40+ years doing civil, rotating points to a line may be very difficult. You need to look at how the text blocks are made the 2nd attribute appears to be located on the line etc so I guess could get an angle of object at that point. It will definatley be a custom program compared to what I just supplied should work with any block with attributes. So that is step1 done in about 4 steps. Anyone else happy if you add on. Multi toggles.lsp Edited November 10, 2023 by BIGAL Quote
Tomohdi Posted November 11, 2023 Posted November 11, 2023 I am grateful for your effort and support. 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.