PDA

View Full Version : VP Common Questions


KHarms
Sep 18, 2009, 01:24 PM
There are several topics that seem to come up with the Visual Programmer and I thought I would take a minute to "get in front of" all the questions.

The first is configuring the Visual Programmer. The Toolbox that is shown on the VP dialog can be configured for what operations to show and in what order. The comment always seems to be that it is hard to find the element wanted.

To configure the toolbox, select from the HCA menu HCA - Properties and look on the Visual Programmer tab. On this tab is a method to set what elements are seen in the VP toolbox and in what order they are seen. If you eliminate all those elements that you will never use - for example thermostat operations if you don't have one - then in makes it much simpler to find what you want.

The other big issue, is that sometimes a visual system can be frustrating when you have a lot to do. Turning on 10 lights can be a chore - if in your application a group wouldn't work.

For that in V9 we introduced the script element. This element starts a text based script that can do, well, anything, that is supported by the HCA Object Model. The obvious things like On, Off, and Dim, but more than that - access to all pieces of HCA state.

What language are scripts written in? Anything you want that can read a type library. We created some examples in VBScript but you could as just as easily written in JavaScript.

All you need do is to configure what script engine to use. That is done in HCA - Properties on the Visual Program tab.

Final note: Scripts are only supported in HCA Plus.

Questions?

dartz
Nov 01, 2009, 02:05 PM
Yes, I use a lot of Active TCL and/or Active Perl for scripting on Windows, can you point me to ANY example/documentation, etc. for accessing HCA procedural interfaces from scripting languages. Thanks (I know, I know, RTFM :-) sorry, I haven't actually looked at the new manual yet :-(.

KHarms
Nov 01, 2009, 03:26 PM
There are some examples stored in the HCA Documents area in the Scripts folder. After that I would look at the Object Model appendix (it's appendix 13). This documents all the objects and methods. Between the samples and the manual it should get you started.

Also look at the user guide chapter on scripts - it has some good info and tells you about some extra feature codes that will help a lot.

I hope you don't think that this is a RTFM answer as it really isn't. The manual says it all much better than I can here.

One small word of caution: This is an advanced topic so that we will be unable to assist beyond describing the objects, methods, and resolving any issues with them. Getting the scripts you create to work as you expect will be your job.

Also,

dartz
Nov 01, 2009, 09:18 PM
Your answer is perfect, thank you so much. And, I've been programming (mostly on UNIX) for almost 25 years so I know if I break something I'll assume it's my fault :)).