How to run a function when dvb file is embeded

How to run a function when dvb file is embeded

m09366023695
Enthusiast Enthusiast
697 Views
3 Replies
Message 1 of 4

How to run a function when dvb file is embeded

m09366023695
Enthusiast
Enthusiast

hi

I run this command and it works fine:

 

(command "vbarun" "F:/gr/masoud.dvb!ThisDrawing.main")

 

now I embeded masoud.dvb file with VBA Manager.(attached file).

 

Now I want to create a icon with CUI command.

I should use path again?

 

(command "vbarun" "F:/gr/masoud.dvb!ThisDrawing.main")

 

 

0 Likes
698 Views
3 Replies
Replies (3)
Message 2 of 4

paullimapa
Mentor
Mentor

You may get better feedback by posting here

https://forums.autodesk.com/t5/vba/bd-p/33


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 4

cadffm
Consultant
Consultant

Hi,

 

>>I should use path again?

 

??  Make no sense

The path is to load the dvb file only,

your embedded function is in your dwg, no longer in a dvb file

and embeddeds are always loaded (if allowed).

 

Skip the path an separator(!)

 

 

 

 

Sebastian

0 Likes
Message 4 of 4

Ed__Jobe
Mentor
Mentor

Hi @m09366023695 

I don't recommend embedding the dvb if you plan to use a cuix file with it. The cuix will always require that you load the dwg that the code is embedded into. Keep it as a dvb. Then create an mnl file with the same name as your cuix. The mnl will automatically load when your cuix is loaded. Now, in the mnl, add lisp to load the dvb and a (defun) to create a command for your vba code. Now you can run your command by typing it at the command line or from your ribbon tab.

See my instructions for the mnl over at AUGI.com.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes