×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Load a LISP at startup of a template

Load a LISP at startup of a template

Load a LISP at startup of a template

(OP)
Hi you all
I would like to post this question:
How could I load a certain LISP when I open a certain Template? I'm thinking of embedding a VBA macro in that template. The VBA macro would then trigger on EndOpen and load the LISP. But I can't seem to get it to work! Does anyone out there have a clue about this or maybe have a suggestion on a better way?.

---------------------------------------------------
Nothing's impossible, it just takes a little longer

RE: Load a LISP at startup of a template

Just maybe:

In embedded Project of that template, as you said,

ThisDrawing.SendCommands (load "myLisp")
ThisDrawing.SendCommands MyLispCommand

Assuming Acad2000.
This wiont do in Acad14

RE: Load a LISP at startup of a template

(OP)
Well... maybe I wasn't specific enough :)

Problem is I don't know how to get the event EndOpen to trigger. Once that is done I don't think I will have a problem with loading the LISP :)

And thank you for mentioning that it will only work in 2000. Do you or does someone have a clue how to get it to work in R14 as well?

Thank you in advance!
----------------------------------------------
Nothing's impossible, it just takes a bit longer

RE: Load a LISP at startup of a template

Acad14

I managed to get to he endOpen in Acad14 but could not embed the project in the drawing. Though I think I had done this before.

Menu-Tools-Macro-VBEditor
Click on ThisDrawing - Code
AcadDocument (in the first dropList box)

EndOpen (in the second dropList box)

sendKeys "myLispCommand" & vbCrLf, 1

In Acad2000.
EndOpen is not there!
EndSave etc are there thoug, useless for our purpose here.

Lets wait for more comments.

Thanks

RE: Load a LISP at startup of a template

(OP)
Thanks! Getting me in the right direction here! :)

Acad2k
I think the EndOpen event is an application event in 2k. And as I beginning to understand it one has to initialize the event handler as a class module, before any event will be recognized. But how to run the event initialization? I mean I want the code to run on an event first thing it does!

Acad14
I got the code to work according to your post:)
But as you I couldn't find a way to embed it.

Let's see if anything else drops in...

Thanks

-----------------------------------------------------
Nothing's impossible, it just takes a little longer

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources