Jump to content

Recommended Posts

Posted

We have an in-house developed batch processing application that we use for collating bound drawings and sending / plotting them.

 

As this was developed a while back I've been asked to give it a refresh. It looks like eTransmit does most of the heavy lifting that I would want to do, but I need to know whether I can externally script it using LT 2008.

 

I can create the list of files to be processed in out application, and use them to create a script, but what do I do about Transmittal Setups (for example the Transmittal File Folder will need to change and we may or may not want to bind Xrefs)

 

Any pointers?

Posted

Hi Dankell

I can write VB scripts that access ACAD and do some automation however, i never tried using E-Transmit via VBA

I have to believe we can do something

 

ML

Posted

VB Would be good. Our internal app will be written in Delphi but I can create scripts send them to ACad using the /b flag on the command line...

Posted

dankell

Do you write scripts with VB Scripting?

Did you want an example?

 

Also, I am not sure what you mean with this part?

send them to Acad using the /b

 

With a VB Script, there is no sending, it is executed by double clicking, then it will open CAD and do it's thing.

 

Then can be execute on logon as well, but I am not sure how to do that.

 

ML

Posted

Fair enough.

 

A quick example would be good, as I've been trying to find some online and failing miserably.

 

In the past we've only used .scr to control AutoCAD so I wasn't aware that VB scripts were used differently.

 

CHeers

Dan

Posted

Hi Dankell,

 

I just read back and thought of something; OK, you are using LT, therefore there is no VBA or LISP capabilities, which is a drag.

 

Yes, with VBScript, I can open ACAD and do so automation in ACAD.

 

Since LT is not VB Enabled, then I would first have to find out if I can grab the ACAD objects from outside of ACAD.

My intuition tells me that the answer is no, but I do not have LT here to test that.

 

Dankell,

Do me a quick favor; take the below code, put it in a txt file, do a saves as and save it as a .vbs file.

With ACAD closed, double click the file and tell me if it opens ACAD.

If it does, then that is a good start.

 

If we can not grab The ACAD objects, via VB, then I am also thinking that if you develop the .scr file and the below code works, then we can possibly use the sendcommand method (also a VB syntax) to send intrinsic ACAD commands like etransmit to the command line in ACAD, or run the .scr file. All of this with ACAD closed, however, the script will need to open ACAD to run the .scr file or whatever we do, still.

 

I forget, why did you need an external script?

 

OK, please try the code below and let me know if it works

Thanks!

ML

 

Dim Acad
Set Acad = CreateObject("Autocad.Application")
Acad.Visible = True

Posted

Thanks for your help

 

The vbs script dowsn't work - we get an error stating that "Active X cannot create the object AutoCAD.application"

 

So looks like thats the end of that.

 

However I have found that I am able to manipulate the registry entries for the eTransmit setups, so can now do most of what I want, if I combine with a simple script for eTransmit command line

Posted

You're Welcome!

Yes, I had a feeling that may be the case, that is why I sent a very simple example. LT simply is not VB Enabled, which sucks!

I could not work at a place that used LT because I use VBA so much and it is so powerful.

 

If you are looking to change a setting in the registry, we can also do that with VBScript, outside of ACAD, but unfortunately, there is nothing we can do with VBScript or VBA inside of The LT app.

 

You will need to convince your employer of the need for real seats of ACAD.

 

Let me know if i can help in any other way

 

ML

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