+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Forum Newbie
    Using
    Map 3D 2013
    Join Date
    Jan 2016
    Posts
    3

    Default Changing color of blocks according to elevation attribute

    Registered forum members do not see this ad.

    Hi everyone,
    I imported some bathymetric coordinates to AUTOCAD map 3d, they appeared as individual blocks, the numbers with a centered cross. I kept only the elevation attribute, adjusting size and position. After that, I had some issues, following:

    I have to put them into a map, in different sizes and rotation angles according to the place, I made different blocks, separating above 10 meters and below 10 meters, because of the position of the numbers (have to be centered, matching the comma with the cross, and they vary depending on the numbers - 1 and 2 digits), and the blocks got mixed in their properties (size and color). I left them like that for a while, because I did manually, but I'm trying to solve this with some routine or queries.

    I also need to classify the different depths with colors, according to the location. Is there a way to do it? Is it better to change from blocks to text? I'm trying to do a query for that, but is not working for blocks or text, I guess I am doing something wrong. Could you please, help me? Thanks in advance.

  2. #2
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,815

    Default

    It would be simple to change the color of text just read the text value and apply the correct color. You may be able to use a field. can you psot a dwg
    A man who never made mistakes never made anything

  3. #3
    Forum Newbie
    Using
    Map 3D 2013
    Join Date
    Jan 2016
    Posts
    3

    Default

    Hi, there are thousands of numbers. That's why I'm trying to work with blocks and queries, if it's possible. Follows a sample attachedAttachment 56794Attachment 56794

  4. #4
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro K4200, 4GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2018
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    46,447

    Default

    It would probably be easier to test any proposed solutions if you were to attach an actual copy of the .DWG file. Images, in most cases, are just pretty pictures and that's about it.
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

    I'm now a full member of the Society for the Promotion of Mediocrity in CAD. Standards? We don't need no stinkin' standards! Take whatever advice I offer and do the opposite.

  5. #5
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,815

    Default

    CIV3D does nice rainbows as a contour option.
    A man who never made mistakes never made anything

  6. #6
    Forum Newbie
    Using
    Map 3D 2013
    Join Date
    Jan 2016
    Posts
    3

    Default

    Hi, I send an example. The numbers in black are the minimum zone depth and all the blue values which are below this should have red color, according to the stated for the zone.
    Is there a way to do this at once? A lisp/query/etc.?
    Thanks in advance

  7. #7
    Super Moderator Cad64's Avatar
    Computer Details
    Cad64's Computer Details
    Operating System:
    Windows 7 Profesional x64
    Computer:
    XI Computers
    Motherboard:
    Asus P8Z77-V Pro
    CPU:
    Intel Core I7 3770K 4.1 Ghz Quad Core 3rd Gen
    RAM:
    24GB DDR3 @ 1333MHz
    Graphics:
    Nvidia GeForce GTX 570 1280MB GDDR5
    Primary Storage:
    SATAII 500GB 7200 RPM
    Secondary Storage:
    Western Digital My Book Studio Edition II - 2TB capacity
    Monitor:
    HPf2105 21" LCD Widescreen & Cintiq 21ux
    Discipline
    Multi-disciplinary
    Cad64's Discipline Details
    Occupation
    Freelance Digital Artist
    Discipline
    Multi-disciplinary
    Details
    3D model building, texturing and rendering. Photoshop Color Graphics.
    Using
    AutoCAD 2014
    Join Date
    Feb 2006
    Location
    Southern California
    Posts
    10,156

    Default

    I have moved your question to the Map 3D section: http://www.cadtutor.net/forum/forumd....php?59-Map-3D
    CGSociety Portfolio: http://rdeweese.cgsociety.org/
    Facebook:
    https://www.facebook.com/rdeweese67/


    "Work Smart, Not Hard"

  8. #8
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,815

    Default

    Registered forum members do not see this ad.

    Try this

    Code:
    ; change color of a block
    ; by Alan H Feb 2016 
    
    
    (vl-load-com)
    (defun c:rlred ( / rl len x val)
    
    (setq rl (atof (vla-get-textstring 
             (vlax-ename->vla-object 
             (car (entsel "Pick rl"))))))
    
    
    (setq ss1 (ssget (list (cons 0 "INSERT")(cons 2 "Map_Survey_Point"))))
    (setq len (sslength ss1))
    (setq x len)
    (repeat len
    (foreach att (vlax-invoke (vlax-ename->vla-object (ssname SS1 (setq x (- x 1)) )) 'getattributes)
    (setq val (atof (vla-get-textstring att)))
    (if (< val rl)
    (vla-put-color att 10)
    )
    )
    )
    (command "regen")
    )
    (C:rlred)
    A man who never made mistakes never made anything

Similar Threads

  1. changing all nested blocks' color to bylayer
    By NoelStalker in forum AutoLISP, Visual LISP & DCL
    Replies: 6
    Last Post: 25th Apr 2016, 06:20 pm
  2. Changing attribute layer and color
    By WPerciful in forum AutoLISP, Visual LISP & DCL
    Replies: 6
    Last Post: 30th Dec 2015, 01:05 pm
  3. Changing color of lines within multiple blocks
    By Elizanoloo in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 4
    Last Post: 23rd Aug 2014, 06:47 am
  4. Changing color of circles in Blocks only
    By Michaels in forum AutoLISP, Visual LISP & DCL
    Replies: 6
    Last Post: 20th Feb 2011, 02:17 pm
  5. changing color in color control (layer )
    By ionica in forum AutoCAD Drawing Management & Output
    Replies: 4
    Last Post: 10th Oct 2005, 07:45 pm

Tags for this Thread

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