+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Super Member skipsophrenic's Avatar
    Computer Details
    skipsophrenic's Computer Details
    Operating System:
    Vista 32 bit
    Computer:
    Compaq
    Motherboard:
    erm . . yeah?
    CPU:
    Intel Pentium Dual CPU E2140 @ 1.60 Ghz
    RAM:
    2039MB
    Graphics:
    don't ask you'll kill me
    Primary Storage:
    360gb
    Monitor:
    21" widescren - 16:10 ratio
    Using
    AutoCAD 2008
    Join Date
    Jul 2008
    Location
    Birmingham, United Kingdom
    Posts
    1,020

    Default Selecting Multiple objects/changing their colour.

    Registered forum members do not see this ad.

    Hi all,

    I have some objects in the area of -10,-10,0 and 110,110,0

    What I want to know, is, is there a bit of code that will select the
    objects in that area and change their colour to red?
    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. - Albert Einstein

    SET FILEDIA = 1

  2. #2
    Super Member ASMI's Avatar
    Using
    AutoCAD 2008
    Join Date
    Nov 2005
    Location
    Oceanus Procellarum, Moon
    Posts
    1,427

    Default

    One of the ways:

    Code:
    (defun c:test(/ oSet)
      (if(setq oSet(ssget "_C" (list -10.0 -10.0)(list 110.0 110.0)))
        (command "_.change" oSet "" "_p" "_c" "Red" "")
        (princ "\nNothing found!")
        ); end if
      (princ)
      ); end of c:test

  3. #3
    Super Member skipsophrenic's Avatar
    Computer Details
    skipsophrenic's Computer Details
    Operating System:
    Vista 32 bit
    Computer:
    Compaq
    Motherboard:
    erm . . yeah?
    CPU:
    Intel Pentium Dual CPU E2140 @ 1.60 Ghz
    RAM:
    2039MB
    Graphics:
    don't ask you'll kill me
    Primary Storage:
    360gb
    Monitor:
    21" widescren - 16:10 ratio
    Using
    AutoCAD 2008
    Join Date
    Jul 2008
    Location
    Birmingham, United Kingdom
    Posts
    1,020

    Default

    Registered forum members do not see this ad.

    thanks m8,
    Works a treat
    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. - Albert Einstein

    SET FILEDIA = 1

Similar Threads

  1. Selecting lines by colour when on 1 layer
    By khyber in forum AutoCAD Drawing Management & Output
    Replies: 21
    Last Post: 8th Oct 2007, 04:04 pm
  2. Selecting objects that are hidden by other objects
    By Siberian in forum AutoCAD Beginners' Area
    Replies: 2
    Last Post: 17th Jul 2007, 07:57 am
  3. help me please. changing colour of model.
    By soccerboy in forum AutoCAD Beginners' Area
    Replies: 4
    Last Post: 9th Apr 2007, 02:21 pm
  4. changing colour of a block
    By carl mac in forum AutoCAD Drawing Management & Output
    Replies: 5
    Last Post: 23rd Feb 2006, 10:34 pm
  5. dimension colour not changing
    By minimad in forum AutoCAD Beginners' Area
    Replies: 3
    Last Post: 27th May 2005, 10:14 am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts