Rooster Posted December 17, 2012 Share Posted December 17, 2012 Got a conundrum for anyone feeling clever today: I have a very simple 2D drawing of a building with room outlines, and nothing else. The rooms consist of separate polylines - these are exported as a DWG file from a survey package. The polylines are joined, but looking at the properties AutoCAD thinks they are open. The solution is to explode the polylines and rejoin, after which they all appear as closed. All fine. However, not wanting to manually do this on all my drawings, I wrote a quick script which goes like this: EXPLODE ALL PEDIT M ALL J 0 ;END The script works, except that it is only exploding and joining one room/group of polylines at a time - ie, after running it, one of my rooms now shows as closed, but the others are still open. If I run it again, one more room will be closed etc etc. Obviously, I need it to do all rooms/polylines in one go. The weird thing is if I manually enter the exact same commands as my script above, it works perfectly. So why the difference? Quote Link to comment Share on other sites More sharing options...
Rooster Posted December 19, 2012 Author Share Posted December 19, 2012 Just an update for anyone that's interested.... I've got round this problem by altering my script to the following: _AI_SELALL XPLODE G E PEDIT M ALL J 0 ;END Seems that it now works when selecting the polylines before exploding. Still doesn't explain why the previous one worked manually but not as a script. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.