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

change vlx command

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
nychoe1
1488 Views, 6 Replies

change vlx command

hi.

I wish everybody a Happy New Year!

I have two vlx file.

 

blocktotable.vlx       --> command : bt

blocktotextli.vlx       --> command : bt

 

two vlx files have same command.

but I want to

blocktotable.vlx       --> command : bt

blocktotextli.vlx       --> command : bxt     <--- like this

 

of course, I know that cannot modify vlx files

how to use command : bxt

 

Give me some feedback. 

6 REPLIES 6
Message 2 of 7
regisrohde
in reply to: nychoe1

It is not possible to edit VLX, and the same commands, conflict, making the command last loaded VLX is called.
To change is necessary to have the original file .LSP
Please mark this as the solution if it resolves your issue.Kudos gladly accepted.
Regis Rohde
Message 3 of 7
rkmcswain
in reply to: nychoe1

Edit the original source code.


R.K. McSwain     | CADpanacea | on twitter
Message 4 of 7
ВeekeeCZ
in reply to: nychoe1


@nychoe1 wrote:

hi.

I wish everybody a Happy New Year!

I have two vlx file.

 

blocktotable.vlx       --> command : bt

blocktotextli.vlx       --> command : bt

 

two vlx files have same command.

but I want to

blocktotable.vlx       --> command : bt

blocktotextli.vlx       --> command : bxt     <--- like this

 

of course, I know that cannot modify vlx files

how to use command : bxt

 

Give me some feedback. 


If you cannot change the code or contact one of the authors... then you can load it each time you run it to make sure it's the last one. (but you need to change the both names.)

 

(defun c:bta nil
  (load "blocktotable.vlx")
  (c:bt)
  (princ)
)

(defun c:bxt nil
  (load "blocktotextli.vlx")
  (c:bt)
  (princ)
)
Message 5 of 7
regisrohde
in reply to: regisrohde


if not have the source code can use the following "alternative solution".
Save the VLX 2 on c :, and then change the path in the code below:

(defun c:bxt()
(load c:\\blocktotextli.vlx)
(c:bt)
(load c:\\blocktotable.vlx)

(princ)
)

Please mark this as the solution if it resolves your issue.Kudos gladly accepted.
Regis Rohde
Message 6 of 7
dgorsman
in reply to: nychoe1

... and thats exactly why you should always use verbose command names.  Let the user set up the PGP file, or a LISP wrapper function, or whatever if they want to use BT, or BTX, etc.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 7 of 7
stevor
in reply to: nychoe1

Old threat but:

1. For

" blocktotable.vlx       --> command : bt

blocktotextli.vlx       --> command : bxt     <--- like this...

how to use command : bxt"

 

You might make a routine of some name, like C:BXTT,

that would load only 'blocktotextli.vlx' and then

execute its 'C:BT' command.

Same for blocktotable.

 

2. And I repeat, beware of the contents of

things you cannot see, as in VLX and FAS.

 

S

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report