Jack_O'neill Posted June 30, 2011 Posted June 30, 2011 Yes!! Of course!! That's it!! A script!! Gawd, I'm turning into a dottering old fool. Toolbar macro: ^c^cfiledia 0 script new.scr Name your script what ever you want, put it in My Documents folder. Script sequence: new filedia 1 -gattach Too many dead brain cells. Quote
clydemit Posted July 1, 2011 Author Posted July 1, 2011 Did anyone find the solution to my problem that worked i dont know how to use lisp at all if someone could explain. Quote
BlackBox Posted July 1, 2011 Posted July 1, 2011 Did anyone find the solution to my problem that worked i dont know how to use lisp at all if someone could explain. In this instance, Jack's Script solution is probably the most appropriate (simplest) solution for you. We'll still be here when you get around to learning LISP. Quote
Jack_O'neill Posted July 1, 2011 Posted July 1, 2011 Clydemit...sorry for the earlier confusion. Scripts are easy, much more so than lisps. All you need is notepad to create one. Each line is the sequence you would type in at the command line. when you get it all typed out and ready to save, go up to your file menu in notepad, hit saveas. when the dialog box pops up, in the line where it says "save as type" change that to "all files" then in the "file name" box name it whatever you want (don't put any spaces in the filename), but be sure to put the suffix ".scr" on it. That tells autocad that it is a script file. Save it in your "my documents" folder so autocad can find it. Then, on your tool bar button, put the sequence I have above, only use the script file you created. I called it "new.scr". You can call it anything you like, as long as there are no spaces or "special" characters, just letters and numbers. Then, when you hit the button, it will turn the filedia box off, and call the script. The script will take over and open a new drawing based on the default template, turn the filedia back on, and launch your gattach command. Script files will run outside of the drawing they are started in and do lots of stuff for you. When I first posted, I was trying to do it all from a toolbar button macro, and they won't work outside the drawing that they start in. It's been a while since I created any of this stuff so I didn't remember everything all at once. I apologize for confusing you. Quote
clydemit Posted July 1, 2011 Author Posted July 1, 2011 Yes!! Of course!! That's it!! A script!! Gawd' date=' I'm turning into a dottering old fool. Toolbar macro: ^c^cfiledia 0 script new.scr Name your script what ever you want, put it in My Documents folder. Script sequence: new filedia 1 -gattach Too many dead brain cells.[/quote'] Ok there is one problem it cant find it so i tried putting the whole folder location in and that didnt work do you need to put the symbols in? Quote
clydemit Posted July 1, 2011 Author Posted July 1, 2011 Ok there is one problem it cant find it so i tried putting the whole folder location in and that didnt work do you need to put the symbols in? Ignore that because the add on controls autocad profile i got it to work by putting it in the add on program file but it does not recognize filedia. Quote
clydemit Posted July 1, 2011 Author Posted July 1, 2011 Ignore that because the add on controls autocad profile i got it to work by putting it in the add on program file but it does not recognize filedia. Ok got it to work here are the final results: macro: ^C^C FILEDIA 0 SCRIPT RASTERSCRIPT.SCR and the script: NEW FILEDIA 1 GATTACH after new you need a break and also after gattach you need one. Thanks for your guys help. Quote
clydemit Posted July 1, 2011 Author Posted July 1, 2011 I still can not get it to work when you have no drawing open...It still stops the macro. Quote
BlackBox Posted July 1, 2011 Posted July 1, 2011 I still can not get it to work when you have no drawing open...It still stops the macro. [MadeUpConversation] Jack - OMG, you just need to...! Renderman - No, no. Wait for it ... [/MadeUpConversation] (^^ I'm sorry, it's Friday, and I'm a bit overly sarcastic - I know. But I am pulling for you to solve this one yourself ^^) Quote
clydemit Posted July 1, 2011 Author Posted July 1, 2011 [MadeUpConversation] Jack - OMG, you just need to...! Renderman - No, no. Wait for it ... [/MadeUpConversation] (^^ I'm sorry, it's Friday, and I'm a bit overly sarcastic - I know. But I am pulling for you to solve this one yourself ^^) True it is friday and you have just confused me the rest of the day. Quote
Jack_O'neill Posted July 2, 2011 Posted July 2, 2011 Sorry guys, got called away. Just got back home. Got a very dear friend, someone I regard as a sister, having "ex" troubles, and he behaves himself much better when there's a big, angry arkansas redneck standing between him and her. anyway, you say it won't work if you have "no" drawing open...that's interesting because when I have no drawing open, I have no toolbars either. Couldn't start it if I wanted to. Don't know what to say. It works here as is but you have to at least have a blank drawing. Gotta start somewhere. I think where you added a blank line after new, I had a space after the W in new. Either will accomplish the task. A space or a blank line, (which isn't really blank, it has a carriage return) issues an "enter" same as hitting the enter key. Since I don't have the gattach command, i put "insert" in instead. It starts a new drawing, and, turns filedia back on and sits there waiting for me to tell it what block to insert. I don't know what gattach does, but I assumed it attached an image of some sort. it should work the same way. 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.