Main Board > Programming
Passing a COM Object to a CMD
Jeffrey Ferreira:
Hi List
I was trying to do the following
def object excel_obj,"Excel.Application"
I then created a *cmd\PO to parse object and return values for troubleshooting...
if i do
call "*cmd\PO",excel_obj it works
but if i do
PO EXCEL_OBJ
i get an error 36 ..i don think it sees it as a numeric...i seem to remember something like *VARIANT
can anyone shed any light on this?
thanks
jeff
Stéphane Devouard:
Hi Jeffrey
When you do
PO EXCEL_OBJ
ProvideX does a CALL to *cmd/PO and passes it whatever you've type after PO as a string
So in PO you need to do
ENTER args$
And if you check args$ you'll see that it has been loaded with " EXCEL_OBJ"
So there is not much you can do with it as your EXCEL_OBJ variable is available in the calling context only, not in your called *cmd program
However, you may want to check out the *cmd/system/tlb CLI program and borrow its first few lines of code which do basically what you want to achieve
Hope this helps
Jeffrey Ferreira:
Hi Stéphane ,
I was hoping there was something that already existed. I should have looked harder. However when i run it it says pvxtlb.exe does not exist? I'm running version 1710-001 on windows...should it be there?
thanks
jeff
Devon Austen:
The pvxtlb.exe is a separate download: https://home.pvxplus.com/downloads/misc/PVXTLB.EXE
For information on it see here:
https://manual.pvxplus.com/PXPLUS/PxPlus%20User%20Guide/External%20Components/PxPlus%20Type%20Library%20Browser/Overview.htm
Jeffrey Ferreira:
Thank you - I will try it out.
Navigation
[0] Message Index
[#] Next page
Go to full version