Hello Everyone;
My problem today is that I have a series of public functions/properties in a Word document that I wish to access from Acad's Visual Lisp. These same functions can be access from Acad's Vba language. Has anyone done this yet? Ideas?
My general goal is to open a Word file, process the text by adding Acad formatting codes, and then put it into an mtext entity. My first attempt was to write the processing code into an Acad's Vba module but it quickly became apparent that there was a big speed penelty for crossing Acad's process space to access Word. Putting the processing code into a Word VBA module solved that problem. (Plus it allowed me to support AcadLT in a limited fashion).
I next cobbled some VB code in Acad to call the functions in my Word document's VBA module. Though Acad did not have the type library info for my functions, it could still successfully call them. I'm not sure, but I think Acad's VBA system resolved the reference at runtime - ie Late Binding.
Once I had the code working, I started on the user interface and found that VB had several limitations. While I could run a macro, I could not pass an arguement to a VB function from say, a menu macro. Also, I couldn't string the macro together with other functions. So, on to Visual Lisp...
Sincerely;
Michelle
My problem today is that I have a series of public functions/properties in a Word document that I wish to access from Acad's Visual Lisp. These same functions can be access from Acad's Vba language. Has anyone done this yet? Ideas?
My general goal is to open a Word file, process the text by adding Acad formatting codes, and then put it into an mtext entity. My first attempt was to write the processing code into an Acad's Vba module but it quickly became apparent that there was a big speed penelty for crossing Acad's process space to access Word. Putting the processing code into a Word VBA module solved that problem. (Plus it allowed me to support AcadLT in a limited fashion).
I next cobbled some VB code in Acad to call the functions in my Word document's VBA module. Though Acad did not have the type library info for my functions, it could still successfully call them. I'm not sure, but I think Acad's VBA system resolved the reference at runtime - ie Late Binding.
Once I had the code working, I started on the user interface and found that VB had several limitations. While I could run a macro, I could not pass an arguement to a VB function from say, a menu macro. Also, I couldn't string the macro together with other functions. So, on to Visual Lisp...
Sincerely;
Michelle