Language: VBSCRIPT
OS: Windows 7
Product: PrimalScript 64bit (Trial version)
Dear reader,
How to make IntelliSense (List Properties and Methods) working for external COM applications such as Excel
For example:
Set objXL = CreateObject("Excel.Application")
objXL. should show the list of properties and methods after the . (dot)
Can somebody tell if this is possible with PrimalScript 2015, and if so explain what steps to take to make this working with PrimalScript 2015 (Trail Version)
Thanks in advance
Arie
PrimalScript - VBSCRIPT: How to make IntelliSense working ..
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
- TestGebruiker
- Posts: 5
- Last visit: Tue Nov 17, 2015 6:07 am
- Alexander Riedel
- Posts: 8478
- Last visit: Tue Mar 26, 2024 8:52 am
- Been upvoted: 37 times
Re: PrimalScript - VBSCRIPT: How to make IntelliSense working ..
That should be automatic as shown here:
Please note that the 64 bit version of PrimalScript cannot see 32 bit COM objects and vice versa.
The above screenshot was created on Windows 7 with the 32 bit version of PrimalScript 2015 and Office 2010 32 Bit.
Please note that the 64 bit version of PrimalScript cannot see 32 bit COM objects and vice versa.
The above screenshot was created on Windows 7 with the 32 bit version of PrimalScript 2015 and Office 2010 32 Bit.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- TestGebruiker
- Posts: 5
- Last visit: Tue Nov 17, 2015 6:07 am
Re: PrimalScript - VBSCRIPT: How to make IntelliSense working ..
Thanks for pointing me in the right direction regarding Excel.
After I installed the 32-bits version of PrimalScript2015 I could see the list of Excel properties and Methods
However I still have some issues with other application / executable
Set objVDApp = GetObject(,"ViewDraw.Application.16")
Set objVDView = objVDApp.ActiveView
PrimalScript debugging is capable of debugging the above two lines. (See Attach screenshot)
However PrimalSense is not working for this application.
I have checked that it is a 32bit application so that shouldn't be the problem
Any idea why PrimalSense isn't working for this executable?
After I installed the 32-bits version of PrimalScript2015 I could see the list of Excel properties and Methods
However I still have some issues with other application / executable
Set objVDApp = GetObject(,"ViewDraw.Application.16")
Set objVDView = objVDApp.ActiveView
PrimalScript debugging is capable of debugging the above two lines. (See Attach screenshot)
However PrimalSense is not working for this application.
I have checked that it is a 32bit application so that shouldn't be the problem
Any idea why PrimalSense isn't working for this executable?
- Attachments
-
- PrimalScript 2015.JPG (251.7 KiB) Viewed 7480 times
- Alexander Riedel
- Posts: 8478
- Last visit: Tue Mar 26, 2024 8:52 am
- Been upvoted: 37 times
Re: PrimalScript - VBSCRIPT: How to make IntelliSense working ..
Generally PrimalScript requires a TypeLib for the COM object to provide PrimalSense. That is where all the data about type, methods and properties is stored.
If the Typelib is not embedded in the server object, correctly registered or, as it happens in some cases, simply not shipped and installed with the application, then there is just no information to display.
As you can see in the screenshot you attached, the object browser states "No Type information found". That indicates a missing or incorrectly registered TypeLib. Check in the application's installation folder if there is a .TLB file.
If not, you will need to contact the vendor of that application for that file.
If the Typelib is not embedded in the server object, correctly registered or, as it happens in some cases, simply not shipped and installed with the application, then there is just no information to display.
As you can see in the screenshot you attached, the object browser states "No Type information found". That indicates a missing or incorrectly registered TypeLib. Check in the application's installation folder if there is a .TLB file.
If not, you will need to contact the vendor of that application for that file.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- TestGebruiker
- Posts: 5
- Last visit: Tue Nov 17, 2015 6:07 am
Re: PrimalScript - VBSCRIPT: How to make IntelliSense working ..
Thanks for your explanation.
I am a novice programmer / script writer and struggle to see why the Object Browser of Microsoft Visual Basic 2010 Express is able to display the properties, methods of the ViewDraw application and PrimalSense isn't. (See snapshot)
Is this because in Visual Basic 2010 Express you make upfront an explicit reference to the ViewDraw executable? (Early binding)
For me this indicates that the ViewDraw executable is correctly installed and registered. Correct?
While with PrimalScript you don't so it has to figure this out by late binding? (Or is there a way to this too for a VBSCRIPT inside PrimalScript?)
As I am working for the company that owns the ViewDraw application (I am not a programmer) I wonder what should ask R&D to do to allow PrimalScript/Sense to see the properties and methods of ViewDraw? (Apparently something is missing inside our executable)
BTW: Being able to debug a VBSCRIPT is already a great step forward!
I am a novice programmer / script writer and struggle to see why the Object Browser of Microsoft Visual Basic 2010 Express is able to display the properties, methods of the ViewDraw application and PrimalSense isn't. (See snapshot)
Is this because in Visual Basic 2010 Express you make upfront an explicit reference to the ViewDraw executable? (Early binding)
For me this indicates that the ViewDraw executable is correctly installed and registered. Correct?
While with PrimalScript you don't so it has to figure this out by late binding? (Or is there a way to this too for a VBSCRIPT inside PrimalScript?)
As I am working for the company that owns the ViewDraw application (I am not a programmer) I wonder what should ask R&D to do to allow PrimalScript/Sense to see the properties and methods of ViewDraw? (Apparently something is missing inside our executable)
BTW: Being able to debug a VBSCRIPT is already a great step forward!
- Attachments
-
- Visual Studio - Object Browser.JPG (300.02 KiB) Viewed 7463 times
- Alexander Riedel
- Posts: 8478
- Last visit: Tue Mar 26, 2024 8:52 am
- Been upvoted: 37 times
Re: PrimalScript - VBSCRIPT: How to make IntelliSense working ..
You need the .TLB file for the object. Once you have that I can tell you how to make PrimalScript use it, even if it is not registered correctly.
Yes, Microsoft Visual Basic probably instantiates the object to query it for its properties and methods.
We do not do this for a variety of reasons. PrimalScript itself does not bind to the object at all. So neither late nor early
1. It is a potential security risk to instantiate an object without requesting the explicit permission of the user.
2. The TLB file is supposed to be there and it is faster and more efficient to use.
3. Last but not least, using the TLB files allows to develop for objects that cannot even be installed on your local machine.
So in other words, you can have PrimalSense for an object on your Windows 7 client even though the object would require
Windows 2014 Server to be actually used.
Yes, Microsoft Visual Basic probably instantiates the object to query it for its properties and methods.
We do not do this for a variety of reasons. PrimalScript itself does not bind to the object at all. So neither late nor early
1. It is a potential security risk to instantiate an object without requesting the explicit permission of the user.
2. The TLB file is supposed to be there and it is faster and more efficient to use.
3. Last but not least, using the TLB files allows to develop for objects that cannot even be installed on your local machine.
So in other words, you can have PrimalSense for an object on your Windows 7 client even though the object would require
Windows 2014 Server to be actually used.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- TestGebruiker
- Posts: 5
- Last visit: Tue Nov 17, 2015 6:07 am
Re: PrimalScript - VBSCRIPT: How to make IntelliSense working ..
Dear Alexander,
I have a type library for the application which I have attached as a 7-Zip file: viewdraw.zip
Note: I had to rename the file extension from .7z to .zip in order to get it attached
Would you be so kind to explain how PrimalScript - PrimalSense can use this type lib as you indicated in your message below.
Kind regards
Ad
I have a type library for the application which I have attached as a 7-Zip file: viewdraw.zip
Note: I had to rename the file extension from .7z to .zip in order to get it attached
Would you be so kind to explain how PrimalScript - PrimalSense can use this type lib as you indicated in your message below.
Kind regards
Ad
- Attachments
-
- viewdraw.zip
- (42.53 KiB) Downloaded 262 times