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

subWorldDraw Question....

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
ChaosInACT
799 Views, 3 Replies

subWorldDraw Question....

I'm trying to get some color into my world draw 🙂

 

This is a custom derived AcDbPolyline object.

 

I'm working with this for simplicity:

 

 

Adesk::BooleanBCHF_LotObject::subWorldDraw(AcGiWorldDraw*mode){

assertReadEnabled();

AcDbPolyline::subWorldDraw(mode);

 

TCHARbuffer[255];

 

_stprintf(buffer,_T("\nLOT: %d"),m_LotNo);

 

mode->subEntityTraits().setColor(2);

mode->geometry().text(m_TxtMspace,normal(),vec.kXAxis,m_TxtSizeMspace,1.0,0.0,buffer);

 

return(AcDbPolyline::subWorldDraw(mode));

}

 

 

Now, when I set subentity traits to 2 here:

 

 

mode->subEntityTraits().setColor(2);

 

 

the polyline AND the text turns yellow. I really would like them different...so the polyline is say 1 and text 2 (just an example) or I could even pin them to layers, etc. perfect would be everything is set to a color except the polyline itself, which reacts to layer....

 

any ideas? short of deriving an entity and remaking polylines from scratch?

 

3 REPLIES 3
Message 2 of 4
owenwengerd
in reply to: ChaosInACT

What happens if you remove the second call to AcDbPolyline::subWorldDraw()?

--
Owen Wengerd
ManuSoft
Message 3 of 4
ChaosInACT
in reply to: owenwengerd

*desperately tries to see second call...*

 

do you mean the return call here:

 

return(AcDbPolyline::subWorldDraw(mode));

 

?

 

otherwise there is only one:

assertReadEnabled();

AcDbPolyline::subWorldDraw(mode);

 

 

though I admit I haven't tried removing the return. the inital DBX wizard put it in there and I left it...

Message 4 of 4
ChaosInACT
in reply to: owenwengerd

suffering sucotash!

 

Great advice my friend!

 

for those (like me) that didnt' just try this in the firstplace cause it's a return,

 

return true;

 

works fine, and puts my base poly on layer and rest on forced behavior..

 

Excellent....

 

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

Post to forums  

Autodesk Design & Make Report

”Boost