Results 1 to 8 of 8

Thread: Need to script 'explode' of hundreds of files ..

  1. #1
    Member
    Join Date
    2009-11
    Posts
    3

    Default Need to script 'explode' of hundreds of files ..

    Hi,
    I'm completely new to AutCad.
    I'm working on translating hundreds of AutoCad 2010 files.

    For translation, firstly I have to extract all text. However the text extraction utility I am using doesn't grab all text in the files. (It works fine on Text & Mtext objects - but not other elements).

    It looks as if the 'explode' command helps with this - if I run it first, it greatly helps with the text extraction process.

    So, I would like to be able to pass the hundreds of file names to a script that would explode all objects and then save the files.

    Any ideas on how I might do this?

    Thank you.
    -Michael

  2. #2
    Super Moderator david_peterson's Avatar
    Join Date
    2002-09
    Location
    Madison, WI
    Posts
    4,440

    Default Re: Need to script 'explode' of hundreds of files ..

    open
    explode
    all

    save

    I think that's all the script you need. Be careful. When you explode Attributes, you get the attribute name not the text that was listed.
    Dave Peterson

    Acad 2012 - Revit Structure 2013 - Z220 - Win 7 64 - i7-3770 3.4GHz 32GB Ram
    "The more you know, the less you know, because the more you know you don't know". --M. Lin

  3. #3
    Member
    Join Date
    2009-11
    Posts
    3

    Default Re: Need to script 'explode' of hundreds of files ..

    Hi Dave,

    Thanks for the response.
    That all looks sensible ... except I'm so new to AutoCad - not sure how to run a script.

    Presumably I create the script in a text file ... how do I execute it?

    I see the 'Command:' prompt in the bottom of my AutoCad screen - into which I can type commands - but I was hoping to do something less interactive. (400 files to process)

    Thoughts?

    Thanks,
    -Michael

  4. #4
    Super Moderator david_peterson's Avatar
    Join Date
    2002-09
    Location
    Madison, WI
    Posts
    4,440

    Default Re: Need to script 'explode' of hundreds of files ..

    You are correct.
    create a simple .txt file with note pad using the script above. Save it as a .scr file.
    Now here's where it get fun.
    Go find a product called Script Pro. Adesk makes it and it used to come with it as part of your migration tool. This will allow you to select the 400+ files you have that you want to run the script on. That's the easy way. If you want to do them one at a time, I'd create a toolbar button the runs it. Simply ^c^cexplode;all;; and that should allow you to simply pick on that button and execute those commands. But at that point it's just as easy to use the short cut keyboard commands. Open the drawing hit ctrl+a; X (for explode) and enter or space bar. Done. One thing this will not do (Neither will the script) is explode blocks within blocks. If you have that issue you'll want to repeat the script or double up on it and repeat the commands within the script.
    I would've tried to provide you with a link to ScriptPro, but our IT wizards decided to block Autodesk's Website. Darn Fun-Police.
    Make Sense?
    Dave Peterson

    Acad 2012 - Revit Structure 2013 - Z220 - Win 7 64 - i7-3770 3.4GHz 32GB Ram
    "The more you know, the less you know, because the more you know you don't know". --M. Lin

  5. #5
    Member
    Join Date
    2009-11
    Posts
    3

    Default Re: Need to script 'explode' of hundreds of files ..

    Thanks Dave - I found the utility, and played with it.
    Looks good.

    Appreciated.

    -Michael

  6. #6
    Certified AUGI Addict jaberwok's Avatar
    Join Date
    2000-12
    Location
    0,0,0 The Origin
    Posts
    8,029

    Default Re: Need to script 'explode' of hundreds of files ..

    To keep the attribute values use BURST in place of EXPLODE.
    It requires that the AutoCAD Express Tools are installed (since it is one of them).
    John B

    "With or without religion, you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion." - Steven Weinberg.

  7. #7
    Certifiable AUGI Addict irneb's Avatar
    Join Date
    2007-07
    Location
    Jo'burg SA
    Posts
    4,344

    Default Re: Need to script 'explode' of hundreds of files ..

    Just asking ... seeing as you're exploding everything to extract the text & then translate it - are you going to try and import it back?

    If this is the case then I'd suggest exploding (or bursting) using a filter so as to not explode stuff like MText, dimensions, hatching, etc.

    If possible it might be better to modify the export / import utility to work with nested objects in blocks as well. It should actually save a CSV file with a column stating each object's handle ... in which case after translating the 2nd column the import would place the correct text on the correct object.
    Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
    My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!

  8. #8
    Member
    Join Date
    2005-11
    Posts
    46

    Default Re: Need to script 'explode' of hundreds of files ..

    I would recommend running the actual process you about to implement by a superior or performing it on a set of copies. Someone could possibly become upset with everything exploded/burst in several hundred drawings.

Similar Threads

  1. Script & Lsp Files on Toolpalette
    By bellis.239472 in forum CAD Management - General
    Replies: 2
    Last Post: 2011-04-12, 01:35 PM
  2. Script Files
    By darin.marsden in forum AutoCAD Customization
    Replies: 21
    Last Post: 2008-02-26, 11:30 AM
  3. Select Objects within a Script to Explode
    By amy.chen in forum AutoCAD Customization
    Replies: 2
    Last Post: 2006-04-06, 11:50 PM
  4. Script files
    By -OTTP-Brembo in forum AutoLISP
    Replies: 8
    Last Post: 2005-03-10, 10:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •