Proxy graphics

Proxy graphics

tech
Enthusiast Enthusiast
1,512 Views
3 Replies
Message 1 of 4

Proxy graphics

tech
Enthusiast
Enthusiast

Good morning all.

 

Can anyone tell me when the proxy graphics are generated for custom entities? I have a custom entity that isn't rendering correctly when the DBX is not loaded. All physical dimensions of my custom entity are stored in imperial units (inches) and scaled in worldDraw when the active drawing is in metric units (mm). Everything looks correct when the DBX is loaded but some sub-entities which are represented by text objects are not showing correctly in the proxy objects.

 

My initial thought was to check the regenType() == kAcGiSaveWorldDrawForProxy in the worldDraw(...) but this doesn't seem to ever get hit (breakpoint).

 

Any suggestions would be appreciated.

 

Mike

 

0 Likes
Accepted solutions (1)
1,513 Views
3 Replies
Replies (3)
Message 2 of 4

artc2
Autodesk
Autodesk
Accepted solution
To get the entity's proxy graphics we call the entity's saveAs method. The default implementation for the saveAs method is to call the entity's worldDraw method. If you've overridden the saveAs method, then that could be why you aren't seeing your worldDraw method called.
Message 3 of 4

tech
Enthusiast
Enthusiast

Thanks for the reply artc2. I do not override the saveAs(...) in any of my custom entities. The worldDraw(...) probably does get fired when saving the drawing, the issue is that if I put the check for the regenType() == kAcGiSaveWorldDrawForProxy, this never seems to be true which is what I expect when generating the proxy graphics. Am I not understanding something correctly here?

 

Mike

0 Likes
Message 4 of 4

artc2
Autodesk
Autodesk
I just tested using the polysamp sample and when I do a save I see AsdkPoly::subWorldDraw() being called with the AcGiWorldDraw::regenType() returning kAcGiSaveWorldDrawForProxy.

Do you have the PROXYGRAPHICS sysvar set to 1 so that proxygraphics will be saved? The default is 1.
0 Likes