Please read the CODE POSTING GUIDELINES.![]()
Registered forum members do not see this ad.
Hi
I'm trying to write a script which would enable me to redefine a block, save and close the drawing. I would like to run it on multiple drawings. I have managed to write a script which does redefine the block but it stops and either I get "Unit-scaling inserted database..." message or it starts a new command..... ("Command: 1.000000")
I did not get the script to save the changes or close the drawings. Any help would me very much appreciated.
Below you will find the script file
Code:(command "._insert" "Drawing Sheet A1=U:/27979/Config/DWGSheets/test/Drawing Sheet A1.dwg" 0.0 _units 1.00 _basepoint 0,0 _scale 1.0 _rotate 0.0 ) qsave (princ) close
Last edited by SLW210; 13th Dec 2011 at 02:26 pm.
Please read the CODE POSTING GUIDELINES.![]()
“A narrow mind and a fat head invariably come on the same person” Zig Zigler
![]()
apologies, I did wasn't aware of code posting guidelines. Please find below coding with the code tags
thanks,Code:(command "._insert" "Drawing Sheet A1=U:/27979/Config/DWGSheets/test/Drawing Sheet A1.dwg" 0.0 _units 1.00 _basepoint 0,0 _scale 1.0 _rotate 0.0 ) qsave (princ) close
Arek




Your mixing lisp and script togther
Code:insert U:/27979/Config/DWGSheets/test/Drawing Sheet A1.dwg 0.0 1.00 0,0 1.0 0.0 qsave close
A man who never made mistakes never made anything
Thanks Bigal,
I modified your code a little however after I specify the rotation angle 0.0, I need to cancel modifing the attributes in the title block. How do I do it? At the moment the script is changing my attributes to "_.save", "_Y" etc....Any help would be very much appreciated!
Code:._insert "Drawing Sheet A1=U:/27979/Config/DWGSheets/test/Drawing Sheet A1.dwg" 0.0 1.00 1.00 0.0 ;here I need to cancel revising the attributes within title block _.save _Y _.close

Create a script, test on one file. If it works, use autodesk scriptpro (search online for it) to apply it to a number of drawings
I have managed to make the script working!!It's my first one, so I'm even more happy!
Just thought will share this script which works. The empty lines are "enter" for the attributes to remain unchanged. And will use ScriptPro to apply it to multiple drawings.
Code:._insert "Drawing Sheet A1=U:/27979/Config/DWGSheets/test/Drawing Sheet A1.dwg" 0.0 1.00 1.00 0.0 _.erase _L _.zoom _E _.qsave _.close _N




Registered forum members do not see this ad.
I was going to post often you need extra lines as if you pressed the enter button, the other way is to uses spaces as the same thing but can be on the same line makes the script a bit easier to read sometimes if its all 1 line.
Try it with yours 2nd line would be next drawing.
Code:open dwg1 ._insert "Drawing Sheet A1=U:/27979/Config/DWGSheets/test/Drawing Sheet A1.dwg" 0.0 1 1 0.0 etc open dwg2 ._insert "Drawing Sheet A1=U:/27979/Config/DWGSheets/test/Drawing Sheet A1.dwg" 0.0 1 1 0.0
A man who never made mistakes never made anything
Bookmarks