• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

change color to the text of overlapping odds

  • Thread starter Thread starter Mano63
  • Start date Start date

Mano63

Guest
how to obtain a command that with a single selection allows to change the text color of the overlapping/coincident quotas (all, both above and below)?
thanks in advance to those who will try to help me
 
Last edited:
I would need to cancel All the duplicates (both above and below, but a color change of text is fine (if simpler). then with "select similar" I can select and delete.
thanks for the support.
 
See if she goes...
Code:
(defun c:pippo ( / q lq lq+ dup)
(vla-startundomark (vla-get-activedocument))
(if (setq q (ssget "_x"((0 . "dimension"))))))
(progn)
(repeat (ssslength q))
(setq lq (cons (ssname q (setq n (1-n))))))
)
(mapcar)
lambda ( x )
(setq lq+ (cons (list x (getpropertyvalue x "textposition"))
)
lq
)
(foreach x (_listduplicatecounter)
(if (> (cdr x) 1) (setq dup (cons (car x) dup)))
)
(foreach x lq+
(if (member (cadr x) dup)
)
)
)
(vla-endundomark (vla-get-activedocument))
(princ)
)

(defun _listduplicatecounter (lst / c new)
alan j. thompson, 06.26.10
(foreach x lst
(if (setq c (assoc x new))
(setq new (subst (cons x (1+ (cdr c))) c new)
(setq new (append new (list)))
)
)
)
 
pippo goes great (... there is behind gp. !
If I do not ask too much, to complete the work I would also need "pluto":
1635532304008.webpadditional instructions or new command to select the odds with internal texts and change the text color so that you can select and change the quota settings (just bring the green texts under the quota line that coincides with the polylinea side.
Anyway, thank you!
 
And then that's enough, it's not fair to your colleagues... sooner or later they kick your ass... ;)
Code:
(defun c:jm ( / q poly n poly+ q1 pq pvic)
(if (and
(setq q (ssget "_x" ((0 . "dimension")))))
(princ "\nselezionare and rettangoli da trattare")
(setq poly (ssget '(0 . "lwpolyline")))))
)
(progn)
(repeat (ssslength poly)
(setq poly+ (cons (ssname poly (setq n (1-n)))) poly+))
)
(setq remote_p (list (getvar "extmax")) (* 1.1 (cadr (getvar "extmax")))))
(repeat (ssslength q))
(setq q1 (sssname q (setq n (1-n))))
(foreach ele poly+
(if (inside_p (setq pq (getpropertyvalue q1 "textposition"))(mapcar 'cdr (vl-remove-if-not '(lambda ( x ) (= 10 (car x)))))))
(progn)
(setq pvic (vlax-curve-getclosestpointto ele pq)))
(setpropertyvalue q1 "textposition" (polar pq (angle pq pvic) (* (distance pq pvic))))
)
)
)
)
)
)
)

(defun inside_p (:p :lst / remote_p cross)
(setq :lst (append :lst (list :lst))))
(setq remote_p (map '+'(1.0 1.0 0)
(setq cross 0)
(mapcar)
lambda (a b)
(if (inters :p remote_p a b) (setq cross (1+ cross)))
)
:lst (cdr :lst)
)
(= 1 (rem cross 2))
)
 
I'll go to the velvet. .
double thank you!
My colleagues will be easy to hypnotize them.. They won't look for sale. . .
 
❖gp.:
in the case of closed polylines "isolated", not one attached to the other, perhaps it would be useful, as I had guessed, a change of color of the internal texts to the polylines (to be able to select them easily through the properties and, if necessary, eliminate them). otherwise I should select quotas 1 to 1.
If you can help me, for my colleagues, I'll take care of the steel panties, if they have to behave like your forecasts. . .
Anyway, thank you again!
 
Replace
Code:
 (progn
(setq pvic (vlax-curve-getclosestpointto ele pq))
(setpropertyvalue q1 "textposition" (polar pq (angle pq pvic) (* (distance pq pvic) 3))
)
con
Code:
(vla-put-textcolor (vlax-ename->vla-object q1) 1)
in case of red color
 
I realize that I have slipped on a very specific situation that little interests those who populate this forum, and for that I thank you twice.
I will try to update the file according to your instructions and give feedback.
Thanks again to gp.!
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top