russleen Posted July 10, 2019 Posted July 10, 2019 I need to process a whole bunch of DWG drawings. First, i need to BURST all the blocks that are on them, and then export it to DXF format. So, what I did is, I wrote a very small script: (load "BURST") BURST ALL _dxfout 16 and also found and modified a BAT file that some kind soul wrote on the forum to run this script on the drawings folder: FOR %%f IN ("C:\Users\plxru_user\Desktop\burst_test\*.dwg") DO "C:\Program Files\Autodesk\AutoCAD 2019\accoreconsole.exe" /i "%%f" /s "C:\Users\plxru_user\Desktop\burst_test\burst2dxf.scr" /l en-US The script works perfectly in AutoCAD, but in ACC it throws an error message saying "Unknown command BURST. Press F1 for help." Same thing happens when I try using custom PBURST from Lee Mac: (load "C:\\Users\\plxru_user\\Desktop\\burst_test\\BurstUpgradedV1-7.lsp") pburst all _dxfout 16 I tried changing PBURST with (C:"BURST"), only to see another error "Unknown command ALL. Press F1 for help." I have no idea about AutoLISP, scripts, etc., all I did was just slapping together the pieces that I found online. Any advices are welcome! Quote
Lee Mac Posted July 10, 2019 Posted July 10, 2019 (edited) I have no experience using the Core Console in AutoCAD and consequently I'm unsure of any incompatibilities with the use of my program in conjunction with this utility. However, an easier approach might be to use my Script Writer application to evaluate my Burst Upgraded application across an entire set of drawings - in this case, the Script Line supplied to my Script Writer might look something like the following: _.open *file* (load "BurstUpgradedV1-7.lsp" nil) (if LM:burstsel (LM:burstsel (ssget "_X" '((0 . "INSERT")(66 . 1))) nil)) _.qsave _.close Edited July 10, 2019 by Lee Mac 1 Quote
russleen Posted July 10, 2019 Author Posted July 10, 2019 4 hours ago, Lee Mac said: I have no experience using the Core Console in AutoCAD and consequently I'm unsure of any incompatibilities with the use of my program in conjunction with this utility. However, an easier approach might be to use my Script Writer application to evaluate my Burst Upgraded application across an entire set of drawings - in this case, the Script Line supplied to my Script Writer might look something like the following: _.open *file* (load "BurstUpgradedV1-7.lsp" nil) (if LM:burstsel (LM:burstsel (ssget "_X" '((0 . "INSERT")(66 . 1))))) _.qsave _.close Thanks for you reply! I tried using this method, but unfortunately, this script gives me an error: (if LM:burstsel (LM:burstsel (ssget "_X" '((0 . "INSERT")(66 . 1))))) ; error: too few arguments Quote
Lee Mac Posted July 10, 2019 Posted July 10, 2019 My apologies, I forgot to include the second argument determining whether nested blocks should be burst - I have updated my earlier post. 1 Quote
russleen Posted July 11, 2019 Author Posted July 11, 2019 1 hour ago, Lee Mac said: My apologies, I forgot to include the second argument determining whether nested blocks should be burst - I have updated my earlier post. Thank you so much! It works just fine. Even though it won't work via core console, must be some functions are not available there, it does exactly what I need. Quote
russleen Posted July 11, 2019 Author Posted July 11, 2019 Update: it seem to be giving an "nil" message at random times, without bursting the blocks. I'm trying to figure out if there's anything different about these drawings. Quote
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.