When drawings are created with an AutoCAD “vertical” software like AutoCAD MEP, P&ID, Mechanical and others, the specialized objects that these verticals create may not display in a session of vanilla AutoCAD. These objects may display a box where objects should be. These objects are somteimes referred to as “proxy”objects/entities or AEC objects. There are free add-ons that you can install on your computer called “object enablers” that will display these objects while being opened in a session of vanilla AutoCAD.
Autodesk provides these free objects enablers [here]
Bentley provides object enablers as well but their entire website and forums are a total mess so it is easier and simpler to use google to search for the particular object enabler (Autoplant, ProStructures…)
There are times though that someone may not want to install anything in order to view the drawing. In this case, there is a command within AutoCAD (actually 2 commands…) that let to convert the special objects into AutoCAD objects (solids).
The command is -EXPORTTOAUTOCAD. Notice the minus sign (or dash) before the command. The other command is actually just another way of starting the same command. This other command is AECTOACAD.
The command has a series of prompts and the end result is that it will create a new drawing and converts the objects to AutoCAD objects. If you accept the defaults at the prompts, the new file that is created is the same name as the original file but with the prefix “ACAD-”
That is where the AutoCAD script file comes in handy, it automates the process for you.
Please save the below code as “Export To AutoCAD.scr” the “.scr” file format is important. This will change the file to an AutoCAD script file. To run this file, simply drag and drop this file into the drawing area, and viola – it is done. You can hit F2 or CTRL + F2 (for AutoCAD 2013) to view the command history to see what it does.