Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load a LISP at startup of a template 1

Status
Not open for further replies.

MatsJ

Mechanical
Oct 3, 2001
5
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
 
Replies continue below

Recommended for you

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

 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor