smitty_92 Posted May 8, 2017 Posted May 8, 2017 I am sort of new to lisp and I am trying to figure out a way that I can insert a block at a certain point (example: 0,0,0) into multiple drawings at once. I have found a way that I can remove a block from multiple drawings at once but not a way to insert one. Any help would be greatly appreciated! Quote
smitty_92 Posted May 8, 2017 Author Posted May 8, 2017 I have tried to work Lee Mac's Point Manager Program with the ObjectDBXWrapper program and I can not seem to get it to work. I am not an experienced person with programming or lisp so that could be most of my problem... Quote
Lee Mac Posted May 8, 2017 Posted May 8, 2017 You could use my Script Writer program with a Script Line similar to the following: _.open *file* _.-insert "YourBlockName" _S 1 _R 0 _non 0,0,0 _.qsave _.close The above assumes that your block is not attributed, or that you have ATTREQ=0. Quote
smitty_92 Posted May 9, 2017 Author Posted May 9, 2017 You could use my Script Writer program with a Script Line similar to the following: _.open *file* _.-insert "YourBlockName" _S 1 _R 0 _non 0,0,0 _.qsave _.close The above assumes that your block is not attributed, or that you have ATTREQ=0. For some reason when I load the script and run it. It only opens the file that I currently have open read only. It doesn't insert the block and doesn't open the rest of the files in the directory... Quote
smitty_92 Posted May 9, 2017 Author Posted May 9, 2017 For some when I run the script it only opens one drawing (the one I have active). It is not opening the rest of the dwgs in the directory or inserting the block that I have named. I have entered it like this (_.open *file* _.-insert "AS-BUILT" _S 1 _R 0 _non 0,0,0_.qsave _.close) any ideas? Thanks so much for the help Lee Mac! Quote
smitty_92 Posted May 9, 2017 Author Posted May 9, 2017 I also tried to run the script that you have posted on your website with the circle. (_.open *file* _.circle 0,0,0 5 _.save _Y _.close) It also is not working for me. Quote
smitty_92 Posted May 9, 2017 Author Posted May 9, 2017 _.open *file* _.circle 0,0,0 5 _.save _Y _.close Quote
smitty_92 Posted May 9, 2017 Author Posted May 9, 2017 _.open *file* _.-insert "AS-BUILT" _S 1 _R 0 _non 0,0,0 _.qsave _.close Sorry for posting the code like I did! Still learning! Quote
Lee Mac Posted May 9, 2017 Posted May 9, 2017 You won't be able to process the current drawing, as open drawings are rendered read-only to a Script file - I would suggest copying the files you wish to process to a separate folder and running the program from within a new blank drawing. If you still experience issues, please post the command-line history. Quote
smitty_92 Posted May 9, 2017 Author Posted May 9, 2017 Worked like a charm! I should have known better! Thanks a ton Lee Mac! 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.