Jump to content

Recommended Posts

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.

Link to comment
Share on other sites

  • Replies 30
  • Created
  • Last Reply

Top Posters In This Topic

  • clydemit

    12

  • Jack_O'neill

    11

  • BlackBox

    8

Top Posters In This Topic

Posted Images

Did anyone find the solution to my problem that worked i dont know how to use lisp at all if someone could explain.:cry:

Link to comment
Share on other sites

Did anyone find the solution to my problem that worked i dont know how to use lisp at all if someone could explain.:cry:

 

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :unsure: ...

 

[/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 ^^)

Link to comment
Share on other sites

[MadeUpConversation]

 

Jack - OMG, you just need to...!

 

Renderman - No, no. Wait for it :unsure: ...

 

[/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.:)

Link to comment
Share on other sites

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.

 

no toolbars.jpg

 

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...