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?
Solved! Go to Solution.
Solved by owenwengerd. Go to Solution.
What happens if you remove the second call to AcDbPolyline::subWorldDraw()?
*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...
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....