.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"work with colors" .net developer's guide

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
adadnet
709 Views, 6 Replies

"work with colors" .net developer's guide

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

6 REPLIES 6
Message 2 of 7
DesignProQuig
in reply to: adadnet

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/
Message 3 of 7
adadnet
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.

Message 4 of 7
DesignProQuig
in reply to: adadnet

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/
Message 5 of 7
adadnet
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.")

Message 6 of 7
dgorsman
in reply to: adadnet

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.
"I don't know" is the beginning of knowledge, not the end.


Message 7 of 7
adadnet
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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost