Author Topic: SSGET modifies the color of the primitives in the group  (Read 1635 times)

0 Members and 1 Guest are viewing this topic.

well20152016

  • Newt
  • Posts: 130
SSGET modifies the color of the primitives in the group
« on: January 15, 2019, 04:26:37 AM »
SSGET modifies the color of the primitives in the group

well20152016

  • Newt
  • Posts: 130
Re: SSGET modifies the color of the primitives in the group
« Reply #1 on: January 15, 2019, 04:38:26 AM »
This is the wrong answer.

(DEFUN C:TT()
  (SETQ SS (SSGET) N 0)
    (repeat (sslength ss)
     (setq e (ssname ss n)
            n  (1+ n))
      (setq en (vlax-ename->vla-object e))
(vla-put-Color EN 6)  ))


ronjonp

  • Needs a day job
  • Posts: 7527
Re: SSGET modifies the color of the primitives in the group
« Reply #2 on: January 15, 2019, 09:17:23 AM »
Maybe the correct answer?
Code - Auto/Visual Lisp: [Select]
  1. (defun c:tt (/ e en n ss)
  2.   (setvar 'pickstyle 0)
  3.   (setq ss (ssget)
  4.         n  0
  5.   )
  6.   (repeat (sslength ss)
  7.     (setq e (vlax-ename->vla-object (ssname ss n))
  8.           n (1+ n)
  9.     )
  10.     (vla-put-color e 6)
  11.   )
  12.   (setvar 'pickstyle 1)
  13. )
« Last Edit: January 15, 2019, 09:23:01 AM by ronjonp »

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

well20152016

  • Newt
  • Posts: 130
Re: SSGET modifies the color of the primitives in the group
« Reply #3 on: January 15, 2019, 09:50:00 PM »
ronjonp,thank!

ronjonp

  • Needs a day job
  • Posts: 7527
Re: SSGET modifies the color of the primitives in the group
« Reply #4 on: January 16, 2019, 09:06:37 AM »
You're welcome :)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC