07-25-2007 06:12 PM
Hi, all -
I posted something like this earlier.
TestStand 3.5. OS: Windows XP.
I created a tool in TestStand that documents any TestStand sequence: it prints the step name, step description, step comment, and step MessageExpr (if a pop-up).
The main steps are ActiveX actions.
I want to add a step that prints out the SmallIcon property.
The step is saved in a local variable called Locals.step.
Locals.icon is an Object Reference.
I've tried "Locals.icon = Get Step{Locals.step}.SmallIcon" - this is what appears when you hover the mouse over the step description.
I've also tried PropertyObject.GetValIDispatch("SmallIcon", 0).
When I try to run the step, I get
"
Details: Parameter 'Return Value': Unexpected Operating System Error.
Error Code: -17501
Unexpected Operating System Error.
"
If someone has actually gotten something like this to work, I'd really appreciate hearing how.
Thanks for whatever help you can provide.
guy dot f dot levin at lmco dot com
07-31-2007 11:28 AM
Hey Guy,
This one is kinda tricky. Instead of Locals.icon being an Object Reference make it a number. The handle to the pictures is actually a numeric value. Something to do with the Windows GDI. Although I'm not sure if this is the best way to do what you are trying to accomplish. Once you have the image or a reference to the image how are you going to embed it into Excel? Are you communicating with excel through it's API?
Maybe you could use the path to the icon easier in Excel. I don't know enough about the Excel API to say which would be easier.
Let me know if this helps,