.NET

Reply
Valued Contributor
FFlix
Posts: 95
Registered: ‎11-15-2011
Message 1 of 7 (250 Views)
Accepted Solution

"work with colors" .net developer's guide

250 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

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.

Active Contributor
DesignProQuig
Posts: 32
Registered: ‎03-02-2012
Message 2 of 7 (219 Views)

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/
Valued Contributor
FFlix
Posts: 95
Registered: ‎11-15-2011
Message 3 of 7 (214 Views)

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.

Active Contributor
DesignProQuig
Posts: 32
Registered: ‎03-02-2012
Message 4 of 7 (211 Views)

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/
Valued Contributor
FFlix
Posts: 95
Registered: ‎11-15-2011
Message 5 of 7 (207 Views)

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.")

*Expert Elite*
dgorsman
Posts: 5,596
Registered: ‎10-12-2006
Message 6 of 7 (190 Views)

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.
A good question will be halfway to a good answer.


Valued Contributor
FFlix
Posts: 95
Registered: ‎11-15-2011
Message 7 of 7 (182 Views)

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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!