Jump to content

Running Script files using VB


bigr1822

Recommended Posts

All, I have a really good feeling that we are the only company that has run into the problem I am about to try and explain to you. AutoCAD really sucks when you try and print a drawing and when it can't find the printer it was last saved with, either because the printer no longer exists or what have you. I have been told you can Manually run Script Files that will add the proper printers and page setup. Please forgive me if I am speaking incorrectly, I have not used AutoCAD since College, 12 years ago. I guess what I am looking for if someone has any examples of VB Code that will run a script file so when users hit the plot button, they won't get the message that comes up, not finding the last printer saved.

 

Help???

 

Thanks All,

Rodney

Link to comment
Share on other sites

Ok, I found some info.

 

>

Dim filenameSCR As String

filenameSCR = "C:\Scripts\" & "Name of Script file" & ".scr"

ThisDrawing.SendCommand ("_script" & vbCr & filenameSCR & vbCr)

>

 

but it always brings up the dialog box wanting you to select the script file.

 

Any ideas???

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