I've got a file that contains various proxy entities that need to be replaced and I'm trying to write a script to replace them with standard blocks. The problem is I have no idea how they are stored. For autocad to show them properly there must be a database entry somewhere that contains x,y data along with what symbol to show them as.
Does anyone know where i can access this and how to iterate over it? I have uploaded a test file with one of the objects.
Solved! Go to Solution.
Solved by norman.yuan. Go to Solution.
With Acad .NET API, there is a class Autodesk.AutoCAD.DatabaseServices.ProxyEntity. However, it does not expose the custom entity's geometries as proxy. Just think, a custom entity could be in any shape in terms of geometry: circle, arc, polygon, cube, sphere, long or short line... How AutoCAD shows as proxy depends on how the developer, who created the custom entity, implement the proxy entities. But the details of this implementation are not exposed to outside in .NET API.
I'd say, trying to replace the proxies with something else (blocks, or other entities) might be a bad idea. If the custom entities in drawing matters for the business, you should install the ObjectARX app that creates the custom entities , or get its object enabler installed. If the custom entities are irrelevant to the business, you can turn off the proxy display in AutoCAD.
Norman Yuan
Oh dear, we dont have access to the original program. Our workaround for many years has been to manually copy our blocks over the top but this is very costly. Is there any other way to read the data from the save file? surely it has to have coordinate data in there somewhere?
Since the ProxyEntity class .NET API does not provide the information you wanted, I think using the corresponding ObjectARX app that creates the custom entity is the only option.
If you export the drawing into DXF format and search the text-formatted DXF file for "AcDbProxyEntity", you may see the proxy's graphics data under group code 310 are binaries, which means it can only be deciphered by the original app, which would be no help to you.
Norman Yuan
Fair enough, i think the only way forward would be to selectively exploded them one by one and work out by the remnants which symbol goes where. Thanks for your help.
Can't find what you're looking for? Ask the community or share your knowledge.