I have a custom entity inherit from AcDbPolyline,it works fine when the dbx and arx file load.but when you save the file and open it without load those two files,the proxy information dialog show and select show proxy option,the proxy entity didn't show.but when you use CTRL+A to select all,it said the proxy entity has been selected.If I choose to inherit from AcDbEntity,everything is ok.why?
thanks.
Solved! Go to Solution.
Solved by owenwengerd. Go to Solution.
AcDbPolyline does not draw proxy graphics for derived classes, at least in earlier versions of AutoCAD. You can override the AcDbEntity::saveAs() method to draw proxy graphics for your object.
what is the AcDbPolyline::saveAs(...) function supposed to do to? What function is it suppose to call?
I tried saveAs(mode, st)
tried worldDraw(mode)
tried subWorldDraw(mode)
I implemented it and still don't see any thing display for AcDbPolyline based custom entities. Have tried setting the proxygraphics variable to 0, 1, and 2 prior to saving the drawing with no perceptible change.
Thanks for the reply.
I did set a break point in the saveAs function and it does get hit. initially I did not hit the break point but a little research revealed I had proxygraphics=0 so there is no attempt to create proxy metadata. Something has changed as this is an old app and in the past we never had to do anything special to get proxy entities to display; worlddraw did the work. Another symptom, only a small fraction of our acdbblock based entities show up as proxies. I can load drawings saved a couple years and ago and proxies display fine, but any new save and proxies don't show. Complication at my end is a former programmer did lots of work to our worlddraw code so I can't rule out it being a change at our end.
Another clue, if I display bounding boxes instead of proxy graphics, the boxes are correct.
Do you think anything could be discerned by inspecting a working dwg file vs a non-working one?
Thanks again for your time.
Can't find what you're looking for? Ask the community or share your knowledge.