change vlx command

change vlx command

nychoe1
Advocate Advocate
1,846 Views
6 Replies
Message 1 of 7

change vlx command

nychoe1
Advocate
Advocate

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. 

0 Likes
Accepted solutions (1)
1,847 Views
6 Replies
Replies (6)
Message 2 of 7

regisrohde
Advocate
Advocate
Accepted solution
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
0 Likes
Message 3 of 7

rkmcswain
Mentor
Mentor
Edit the original source code.


R.K. McSwain     | CADpanacea | on twitter
0 Likes
Message 4 of 7

ВeekeeCZ
Consultant
Consultant

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


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
0 Likes
Message 6 of 7

dgorsman
Consultant
Consultant

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

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