lucatop Posted July 22, 2019 Share Posted July 22, 2019 (edited) Hi I need a single macro that explode all, change all properties to color white, layer 0 and line type continuous. I have to be sure that all is exploded (also block in block) and poly line and also be sure that all is purged. Now I work launching many time command "A" and next many times command "B". (a random times each because I don't know what kinds of draw is evry). Command A ^C^C^C_ai_selall;_explode Command B ^C^C^C_ai_selall;_chprop;color;7;linetype;continuous;layer;0;;-purge;all;*;n If I try to write this don't work, there is a selection problem also because many time the second explode command doesn't finds anything to explode. ^C^C^C_ai_selall;_explode;;_ai_selall;_explode;;_ai_selall;_explode;;_ai_selall;_chprop;color;7;linetype;continuous;layer;0;;-purge;all;*;n;;-purge;all;*;n;;-purge;all;*;n Edited July 22, 2019 by lucatop Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 23, 2019 Share Posted July 23, 2019 I tried manually "explode all" it seemed to work. ai_selall asks for a point ? Quote Link to comment Share on other sites More sharing options...
lucatop Posted July 25, 2019 Author Share Posted July 25, 2019 Hi BIGAL I try ^C^C^C_explode;all;;_explode;all;; But is different like I digit de command Esc Esc Esc _explode enter All enter enter _explode enterA ll enter enter In the second way it work and explode a polyline inside a block... In the fist way don't work. Quote Link to comment Share on other sites More sharing options...
lucatop Posted August 22, 2019 Author Share Posted August 22, 2019 Some ideas? Thanks Quote Link to comment Share on other sites More sharing options...
maratovich Posted August 22, 2019 Share Posted August 22, 2019 Why not Lisp? Quote Link to comment Share on other sites More sharing options...
steven-g Posted August 22, 2019 Share Posted August 22, 2019 I tried a few things with this, it looks like Autocad LT has some serious timing issues, probably the same problem in full, If you run the following string of commands individually it works as expected. And will explode nested blocks and even handel not finding anything to explode. _ai_selall _explode _ai_selall _explode _ai_selall _explode _ai_selall _explode If you copy and then paste all 8 lines into the commandline then that works as well. But if you make it into a scr file and try to run that either from a macro or just drop it onto the program window then it fails, and again if you try that sequence in a macro _ai_selall;_explode;_ai_selall;_explode;_ai_selall;_explode;_ai_selall;_explode; It fails at the first explode command just a single sequence works and can be repeated multiple times _ai_selall;_explode; but add anything else and it fails again so _ai_selall;_explode;_ai_selall; The above fails as well prompting that a point is required as BIGAL pointed out. It is almost as though the commands are coming in too quickly for the program to handel or that the sequence is getting mixed up in the internal working of macros & scripts. Quote Link to comment Share on other sites More sharing options...
tombu Posted August 22, 2019 Share Posted August 22, 2019 On 7/22/2019 at 9:35 AM, lucatop said: Hi I need a single macro that explode all, change all properties to color white, layer 0 and line type continuous. Like maratovich I gotta ask is lisp an option? Exploding blocks and polylines greatly increases file size and dumbs down a drawing. Would simply changing all properties to color white, layer 0 and line type continuous including blocks be enough? Quote Link to comment Share on other sites More sharing options...
deano33 Posted February 5, 2020 Share Posted February 5, 2020 I have some standard macros for converting incoming architects drawings to xrefs and new drawings with the above as part. I use this to automate making the drawing to my standard before import. I addition I would like to add a macro that sets the drawing units to millimetres so it imports at the correct scale. Does anybody have the macro for this? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 5, 2020 Share Posted February 5, 2020 I want mm (setvar 'insunits 4) Quote Link to comment Share on other sites More sharing options...
tombu Posted February 6, 2020 Share Posted February 6, 2020 On 8/22/2019 at 5:53 AM, steven-g said: I tried a few things with this, it looks like Autocad LT has some serious timing issues. Try using DELAY calls between them: DELAY (Command) Provides a timed pause within a script. Specifies the duration of a pause. Entering delay 1000 in your script delays the start of execution of the next command for about one second. The longest delay available is 32767, which is slightly less than 33 seconds. http://help.autodesk.com/view/ACD/2020/ENU/?guid=GUID-C352A9F4-0057-43AD-9642-9BAA881224F8 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.