Jump to content

Open file and run lisp - macro


mdbdesign

Recommended Posts

Never did it before:

Need button macro that will open file (dwg) and execute one lisp command in it.:?

It is possible just something very simple?

Thank you in advance.

Link to comment
Share on other sites

Lee I will need it only for one dwg. I don't need it to load with every start up. That is the problem. Start file execute lisp and that it for few weeks and start over again. It must be done in same way always but I think I or somebody will not remember it after time.

Link to comment
Share on other sites

Not exactly what you want, but in your program shortcut, you can add

/f "FILe.dwg"
and it will open autocad with that file.
Link to comment
Share on other sites

Thing is: somebody with 0.0000001% knowledge of AutoCAD will use it most of the time to update dwg. Need it foul proof. just one click and done.

Link to comment
Share on other sites

Sounds like a script is the answer or put it in the acaddoc file that if a filename matches the specific file, run the lisp on it.

Link to comment
Share on other sites

Or just change

with 0.0000001% knowledge of AutoCAD will use it
to 1% will work. It is possible.
Link to comment
Share on other sites

If you have made yourself a button, then add a macro in there like this:

 

 
^C^C^Pmylisp;

 

Of course "mylisp" is an example function in the lisp file itself.

Thats for the button...

 

Create and save the lisp in one of the autocad support file search paths. You can see where they are or add the folder where your lisp is stored: options>first tab>support file search paths>add>browse to your location.

 

Now in this same folder create a file called acaddoc.lsp. In this file you put 1 line:'

 

 
(autoload "FILENAME" '("mylisp" "mylispifIhad2namesforit")

 

Well all this should do what you need.

 

Much credit to Alanjt and others who have helped me a lot with this.

Link to comment
Share on other sites

End up with script. Its working.

Looks like my coworker like it and now I got question how to pick up phone with script?:shock:

No comment.:P

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