AQucsaiJr Posted June 2, 2009 Posted June 2, 2009 I need to add one drawing/block reference to each drawing in a project I am working on. It will be the same block added to each drawing, and it will be placed in the same spot on every drawing. It will be way too time consuming, at this point in the project, to go through all the drawings one by on to add this in, so I am looking for a possible third party program or something like it to do this for me. I am not familiar with the code enough to write it myself unfortunately, however I can manipulate code pretty well if the program is close to what I need. Anyone know of something I can use to do this? Quote
ReMark Posted June 2, 2009 Posted June 2, 2009 I would think a script file would be the way to go when handling a batch of drawings. Just my personal opinion. Quote
AQucsaiJr Posted June 2, 2009 Author Posted June 2, 2009 Ya. That's what I am thinking as well, however, I don't even know where to start to design such a script. Quote
ReMark Posted June 2, 2009 Posted June 2, 2009 Then you will benfit from reading this. I know I did. http://www.ellenfinkelstein.com/autocadtips/AutoCAD_tips_automate_scripts.html Quote
ReMark Posted June 2, 2009 Posted June 2, 2009 One more for you. A link to an article written by Ralph Grabowski entitled How to Write a Script File. http://www.tutorialhero.com/click-50691-how_to_write_a_script_file.php The article is a bit more in depth than Ellen Finkelstein's. Quote
rkent Posted June 2, 2009 Posted June 2, 2009 At the end of ellen's scripts tips is a mention of Autodesk's free Scriptpro, so get that and your life should be much easier. Quote
ReMark Posted June 2, 2009 Posted June 2, 2009 One more for you and it is by Eren Pala over at the daily autocad. The title of the article is Script Usage (To Edit Multiple Drawings Quickly). Check it out. http://www.dailyautocad.com/autocad/script-usage-to-edit-multiple-drawings-quickly/ Quote
ReMark Posted June 2, 2009 Posted June 2, 2009 AQucsaiJr: How's it going? Any luck so far with your script? Quote
AQucsaiJr Posted June 2, 2009 Author Posted June 2, 2009 Just got back from a meeting... I am sifting trough all this information now... I noticed the scriptpro program did not seem to have a version for ACAD 09... Does this mean it will not work for me? I am going to read these articals you have posted... They seem to have quite a bit of useful information... Thanks for all the help... Ill keep you posted on changes. Quote
ReMark Posted June 2, 2009 Posted June 2, 2009 Other than the fact that you have mutiple drawings to edit (same block in same location) a simple script file that references a list of drawings doesn't seem like it would be that difficult to put together. It might take a little trial and error (set up three dummy drawings: test1, test2 and test3) to get it working properly. The three articles I have provided links to should help you. If you run into a problem return here and post a question. Quote
AQucsaiJr Posted June 2, 2009 Author Posted June 2, 2009 I am running into some trouble with how to write the text that will open each drawing. I think I can write the code for inserting the block. Quote
ReMark Posted June 2, 2009 Posted June 2, 2009 Look at the article posted at the daily autocad website. The English is a bit awkward but I believe the premise behind what the author is trying to convey is solid. To include all the drawing file names in your script file would be a big task. Quote
ReMark Posted June 2, 2009 Posted June 2, 2009 Here is a quick script I wrote to open a single drawing, add a block, save and close. open c:\dwg\test1 filedia 0 zoom e -insert c:\dwg\testblock 90,90 1 1 0 filedia 1 _qsave close Quote
AQucsaiJr Posted June 2, 2009 Author Posted June 2, 2009 Ya i understand what the author is trying to do but I have tried to use DOS to formulate the list with no luck and the MS Word document file download does not seem to work. I guess I could copy it from the image. Quote
ReMark Posted June 2, 2009 Posted June 2, 2009 So you are somewhat familiar with DOS? To generate a DOC or TXT file you have to type the following at the command prompt. Substitute the name of your drawing file text or document file for mydrawinglist. dir > mydrawingslist.txt The file can then be opened with Word (DOC) or Notepad (TXT) and editted. I'm assuming you are in the directory (folder) where the drawing files are kept. If they are in multiple directories you'll have to modify the above. Quote
AQucsaiJr Posted June 2, 2009 Author Posted June 2, 2009 I guess my problem is that I am not familiar with DOS because it keeps telling me that the file path does not exist... I am copying it directly from windows explorer and pasting it into the DOS command line: W:\Projects\Wilderness - 408\In design I want all the files in the In Design folder in the list. Quote
AQucsaiJr Posted June 2, 2009 Author Posted June 2, 2009 It is a drive that is on the network, not on my PC... Does that matter? Quote
rkent Posted June 2, 2009 Posted June 2, 2009 Just got back from a meeting... I am sifting trough all this information now... I noticed the scriptpro program did not seem to have a version for ACAD 09... Does this mean it will not work for me? I am going to read these articals you have posted... They seem to have quite a bit of useful information... Thanks for all the help... Ill keep you posted on changes. Scriptpro for 2007 and higher. http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=4091678&linkID=9240618 Quote
ReMark Posted June 3, 2009 Posted June 3, 2009 It is a drive that is on the network, not on my PC... Does that matter? I'm thinking back to MS-DOS version 5.0 and remembering the PATH command. As I recall MS-DOS would only recognize paths of up to 66 characters in length. This included the drive letter and colon. Does your path exceed this? 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.