clydemit Posted April 3, 2012 Posted April 3, 2012 Ok i have this macro: ^C^Cgraphscr ;filedia 0; script "logo.scr" that opens this script: _Insert "L:\AUTOCAD\Titleblocks\SSAB Logo\SSAB Logo.dwg" ;And to finish the script Filedia 1 I am running autocad 2010 64 bit on windows 7 64bit The script works if i run it via the command line instead of through a button but the macro does not want to work except if i have a blank (acad.dwt) drawing open. It recalls the the last command before starting the macro: Command: Command: Command: graphscr Command: GRAPHSCR Command: filedia Enter new value for FILEDIA : 0 Command: FILEDIA Enter new value for FILEDIA : script Requires 0 or 1 only. It fails because filedia is running again then instead of answering as 0 or 1 it uses script, which fails. I have tried multiple things. Please Help Also the buttons to put code in are not working. Quote
clydemit Posted April 3, 2012 Author Posted April 3, 2012 Please revise your post using . Please read the last line of my post they are not working. They are not clickable. edit nevermind i am typing in code manually Quote
BlackBox Posted April 3, 2012 Posted April 3, 2012 Please read the last line of my post they are not working. They are not clickable. The suggestion for you to reformat your post is to help you to not deter those who would dismiss your thread (because it's text and code jumbled into one monolithic paragraph), my friend. A post that is easier to read, and is clearly understood will yield more helpful results, than one that is not. Quote
clydemit Posted April 3, 2012 Author Posted April 3, 2012 The suggestion for you to reformat your post is to help you to not deter those who would dismiss your thread (because it's text and code jumbled into one monolithic paragraph), my friend. A post that is easier to read, and is clearly understood will yield more helpful results, than one that is not. Did not mean to sound strong i was just stating the fact that non of the buttons are working in the post, not even changing fonts or adding smiley faces. Quote
BlackBox Posted April 3, 2012 Posted April 3, 2012 No worries; I genuinely was trying to assist you. Thanks for reformatting the OP, it is much, much easier to read now. Let me take a closer look at the OP again.... Quote
BlackBox Posted April 3, 2012 Posted April 3, 2012 Give this macro a try: ^C^Cgraphscr;(setvar 'filedia 0);script;"logo.scr"; Quote
clydemit Posted April 3, 2012 Author Posted April 3, 2012 Give this macro a try: ^C^Cgraphscr;(setvar 'filedia 0);script;"logo.scr"; Ok that works !!!!!! But i have another question.: ; How do i make the block insert without asking me for scale or rotation, i just want to be able to pick the spot to insert then end the command. Quote
BlackBox Posted April 3, 2012 Posted April 3, 2012 How do i make the block insert without asking me for scale or rotation, i just want to be able to pick the spot to insert then end the command. You must specify the necessary parameters within the command call. Example: ._-insert "L:\\AUTOCAD\\Titleblocks\\SSAB Logo\\SSAB Logo.dwg" pause 1. 1. 0. Quote
clydemit Posted April 3, 2012 Author Posted April 3, 2012 You must specify the necessary parameters within the command call. Example: ._-insert "L:\\AUTOCAD\\Titleblocks\\SSAB Logo\\SSAB Logo.dwg" pause 1. 1. 0. I did not work and i copied exactly what you have posted in the code box. I will just hit enter 3 times afterword it does not bother me. Although the (filedia 1) at the end of the script is not working. i think it might be my note. Quote
BlackBox Posted April 3, 2012 Posted April 3, 2012 I was only adding to what you already had (I think I forgot to put quotes around the command string), but technically, there's no reason to call a script in the first place, or deal with FILEDIA as you can simply invoke the command line version of the INSERT command. Note the preceding hyphen "-": You can paste this in the command line, and hit enter - (command "._-insert" "L:\\AUTOCAD\\Titleblocks\\SSAB Logo\\SSAB Logo.dwg" pause 1. 1. 0.) Quote
clydemit Posted April 3, 2012 Author Posted April 3, 2012 I was only adding to what you already had (I think I forgot to put quotes around the command string), but technically, there's no reason to call a script in the first place, or deal with FILEDIA as you can simply invoke the command line version of the INSERT command. Note the preceding hyphen "-": You can paste this in the command line, and hit enter - (command "._-insert" "L:\\AUTOCAD\\Titleblocks\\SSAB Logo\\SSAB Logo.dwg" pause 1. 1. 0.) I will try this instead later got to get some work done today so I can not be messing with this. But thanks for your help:) Quote
LibertyOne Posted April 4, 2012 Posted April 4, 2012 A post that is easier to read, and is clearly understood will yield more helpful results, than one that is not. Yoda could not have said this better. Quote
BlackBox Posted April 4, 2012 Posted April 4, 2012 I will try this instead later got to get some work done today so I can not be messing with this. But thanks for your help:) No worries; You're welcome. Yoda could not have said this better. That is very kind of you to say. "Brevity is the soul of wit"... Unfortunately, I am neither brief, nor witty. 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.