• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    Valued Contributor
    FFlix
    Posts: 89
    Registered: ‎11-15-2011
    Accepted Solution

    "work with colors" .net developer's guide

    163 Views, 6 Replies
    04-01-2012 12:46 PM

    from the above, "[...] use the color numbers to identify certain objects in the drawing, even though you cannot see the colors on your screen."

     

    how's that? blocks come to mind, sort of, but this sounds more like a 'light-weight' way of colour-labelling objects, unless i'm not seeing the forest for the trees, that is.

     

    thanks

    Please use plain text.
    Active Contributor
    Posts: 28
    Registered: ‎03-02-2012

    Re: "work with colors" .net developer's guide

    04-02-2012 09:35 AM in reply to: FFlix

    Are you trying to color existing objects in your drawing?

    If so you will have to choose a method of selecting them,

    either by direct selection or group filtering them, then open

    each object for write in a for each, and then applying the

    color you want based on your matching criteria.

     

    Can we have details?

     

    Sorry if I mis-understood.

     

    http://www.designprosoftware.co.uk/
    Please use plain text.
    Valued Contributor
    FFlix
    Posts: 89
    Registered: ‎11-15-2011

    Re: "work with colors" .net developer's guide

    04-02-2012 11:03 AM in reply to: DesignProQuig

    hi, thanks for replying.

     

    the emphasis is on the second part of the sentence, i.e. how to assign a colour number to an object (for identification/tagging/selection/filtering etc) WITHOUT displaying the colour associated with this colour number "on screen". in other words, how can a colour be assigned to an object without colouring the object in that colour.

     

    e.g. set the colour of an object to 'byblock', copy and paste it as block and assign the new block a colour different from the object's explicit or layer's colour. the block appears in the block's colour (whilst the 'byblock' setting of the object within the block turns it black/white inside the block; re-setting the object's colour from 'byblock' to an explicit or via 'bylayer' to its layer's colour makes it appear in that colour again.) this would be one way, sort of, and a 'long' one at that, to assign one colour to an object but display it in another, yet, the way the developer's guide words it gives the impression there is an easier way.

     

    i'd like to find out whether this is indeed possible and if yes, how, or if i'm chasing shadows.

    Please use plain text.
    Active Contributor
    Posts: 28
    Registered: ‎03-02-2012

    Re: "work with colors" .net developer's guide

    04-02-2012 11:08 AM in reply to: FFlix

    LOL, I' pretty confused, but I think I do somehting silimlar in my software.

     

    Is this what you mean:

     

    As you insert an existing block, using your code you specify a "NEW" .indexcolor and the objects in that block pick up the specified NEW color when inserted?

     

     

    http://www.designprosoftware.co.uk/
    Please use plain text.
    Valued Contributor
    FFlix
    Posts: 89
    Registered: ‎11-15-2011

    Re: "work with colors" .net developer's guide

    04-02-2012 11:52 AM in reply to: DesignProQuig

    let me put it this way:

     

    is it possible to assign a colour number to an object (not necessarily a block) without displaying the object in this colour?

     

    (reference .net developer's guide, header 'work with colors', "[...] use the color numbers to identify certain objects in the drawing, even though you cannot see the colors on your screen.")

    Please use plain text.
    *Expert Elite*
    dgorsman
    Posts: 3,380
    Registered: ‎10-12-2006

    Re: "work with colors" .net developer's guide

    04-02-2012 03:12 PM in reply to: FFlix

    I think you are mis-reading that particular line.  What its referring to is you can check the color setting of an object without it being displayed e.g. off-screen or in a side-database, and use that to determine if it meets certain criteria such as 256/BYLAYER, or GREEN, or between 8 and 249, etc.

    ----------------------------------
    If you are going to fly by the seat of your pants, expect friction burns.
    Adopt. Adapt. Overcome. Or be overcome.


    Please use plain text.
    Valued Contributor
    FFlix
    Posts: 89
    Registered: ‎11-15-2011

    Re: "work with colors" .net developer's guide

    04-02-2012 06:14 PM in reply to: dgorsman

    i take your point and maybe that's what it means - although, that pretty much is the nature of .net, i.e. a designer creates and edits objects on-screen whereas a programmer manipulates a [.dwg] database; so i might be forgiven to think that pointing out to developers that not everything in the database has a visible reflection offers itself to mis-interpretation. thanks though

    Please use plain text.