Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

calling bedit via lisp

7 REPLIES 7
Reply
Message 1 of 8
jseefcoot
576 Views, 7 Replies

calling bedit via lisp

I'm trying to add the BEDIT command to my command macros, which I redefine using LISP. I have no problems getting the command to work, but I want to see the dialog box. It doesn't work even when I use INITDIA; it requests the block name on the command line instead.

Here is the line from my LISP file:

(defun c:BB () (INITDIA) (command "BEDIT") )

I have tried this using .BEDIT and -BEDIT, and neither gives me the dialog box, although they will all work for calling up the command. I have also tried omitting INITDIA, but that doesn't work either.

What am I missing?
7 REPLIES 7
Message 2 of 8
bnarum1
in reply to: jseefcoot

I might be over simplifing but why not just add BB to your pgp file instead of creating a routine to run a routine.
If you add your custom shortcut keys to the end of the pgp file it will overwrite the previous loaded definition. By placing at the end of the pgp file you can easily copy to next pgp file for next autocad release.
B
Message 3 of 8
jseefcoot
in reply to: jseefcoot

I've always done it with LISP simply because it's a little faster for me to carry around with me from workstation to workstation. (Mostly because I am used to it, having done it this way for years). I have to work on several different computers and simply got in the habit of always keeping a disk or flashdrive with my macros and customizations on it. Doing this with the pgp file is a little cumbersome; using LISP I can call up just the macros, without overwriting the pgp file of the person I am helping.
Message 4 of 8
Anonymous
in reply to: jseefcoot

Testing in 2007 and 2008:

(command ".bedit "); <-note the extra space
fails but then if I hit the Up Arrow once I get the dialog.

Very strange.


This works in 2007 and 2008.

(vla-sendcommand
(vla-get-activedocument
(vlax-get-acad-object))
"bedit ");<- note the extra space.

--
Autodesk Discussion Group Facilitator
Message 5 of 8
jseefcoot
in reply to: jseefcoot

Yes, I can reproduce that here. That IS pretty strange.

As far as this other piece of code, how do I incorporate that into my LISP file and retain the desired 'BB' alias?
Message 6 of 8
Anonymous
in reply to: jseefcoot

(defun c:bb ()
(vla-sendcommand
(vla-get-activedocument
(vlax-get-acad-object))
"bedit "
)
(princ)
)

--
Autodesk Discussion Group Facilitator


wrote in message news:5699156@discussion.autodesk.com...
Yes, I can reproduce that here. That IS pretty strange.

As far as this other piece of code, how do I incorporate that into my LISP
file and retain the desired 'BB' alias?
Message 7 of 8
jseefcoot
in reply to: jseefcoot

That works great!!

Thanks for the speedy solution.
Message 8 of 8
Anonymous
in reply to: jseefcoot

You're welcome. One thing you might do is add
(vl-load-com) to make sure the vl-* functions work.

--
Autodesk Discussion Group Facilitator


wrote in message news:5699159@discussion.autodesk.com...
That works great!!

Thanks for the speedy solution.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost