Contents

 Symbol Factory ActiveX 2.0 Help

Introduction to Symbol Factory ActiveX

Important Design Tips

Symbol Factory Standard Control

Properties
Methods
Events
Property Pages

Symbol Factory Cutaway Control

Properties
Methods
Events
Property Pages

Frequently Asked Questions

Working With…

Working with Visual Basic

Working with VB.NET

Working with Intellution iFix

Working with RSView
Using with OPC Servers

Contents of this help file are Copyright Software Toolbox Inc, 2002-2004, All Rights Reserved Worldwide. No unauthorized copying or duplication of this help file is allowed.

Help file last updated: March 25, 2004


Product Overview

Symbol Factory ActiveX Product Overview

The Symbol Factory ActiveX product provides you with a single binary OCX named SymfacX.ocx that contains two classes:

  • SFStandard - this control, also known as the "Standard Control", provides you with access to our library of over 4,000 professionally created industrial objects, 90% of which are lean, vector based images that resize/scale without loss of quality. This class is the most powerful part of the product because of all that it can do in a single control instance. Through the Symbols Tab on the custom property page, you can select which of over 4000 objects to display and the configure its appearance using the Style and Animation Tabs. The Standard Control style tab on its property page is shown below. Click on the image for more details.

  • SFCutaway - this control, also known as the "Cutaway Control", provides you with a cutaway object that can be layered on top of the SFStandard control to provide tank fills, etc. The cutaway control can change its fill color in a variety of ways based off of analog or discrete values. Click on the screens below for more details.


Important Design Tips

Please read over these carefully. Depending on how you plan to use the Symbol Factory ActiveX 2.0, these design tips could save you time and frustration.

For users of Windows 2000 and XP:

Display/Desktop Font Size/DPI Setting

  • These operating systems allow you to change the DPI (dots per inch) setting used for your fonts in your desktop theme.

  • Although you may think "DPI - well isn't that the same as monitor resolution - that shouldn 't matter". Well when we are talking about screen fonts and re-scaling of objects from one computer to another, not quite. It does matter.

  • This is a nice feature, but if you will be developing on one computer and deploying to another, some attention to planning is required.

  • You should make sure that the DPI setting on the development machine matches what you will have on your deployment machines BEFORE YOU START WORK. It is likely that everyone is using the defaults for the operating system, so you will not have any issues. However, if you have users who like to change their desktops and customize them, you need to be concerned with this as the application developer.

  • If you change from one computer to another, and the DPI settings are different, and you have objects at non-default sizes, then you can see clipping of images.

In Windows 2000, this is found at:

    • Start->settings->Control Panel->Display

    • Under Display, go to the settings tab, click the Advanced button, and on the general tab, you will see a choice for Font Size. The Windows 2000 Default is Small Fonts, Normal Size (96 dpi).

    • If you change this to 125%, this doesn't just change fonts, it can also cause the scale factor of other objects to change. Be aware of this.

In Windows XP, this is found at:

    • Start->settings->Control Panel->Display

    • Under Display, go to the settings tab, click the Advanced button, and on the general tab, you will see a choice for Font Size. The Windows XP Default is Normal Size (96 dpi). HOWEVER, certain video cards or monitors come with drivers that when installed may change this to "Large Size (120 dpi)". Be aware of this fact and check before you start work.

    • If you change this to Large Size this doesn't just change fonts, it can also cause the scale factor of other objects to change. Be aware of this.

The key is to make a choice for what size you will use in your application and be prepared to advise your users that they need to set these settings to what you used in your application.

If you are using a container application that does not support background transparency:

Certain container applications do not support ActiveX control background transparency. In those cases, when you place an instance of the Symbol Factory Standard Control on a form, the .BackStyle property will default to 1 - Opaque and the background color will be automatically matched to the background of your form.

This results in some important design considerations:

  1. Set background color of your form before placing instances of the Standard Control on the form. That way we will match the background color of the control instances to your form. Otherwise if you change the form later, you will need to select your instances of the control (which you can do all at one time), and use the container property page (as opposed to our custom property page), to set the BackColor property to match your form.

  2. Avoid changing your Form color at runtime unless you are prepared to also update the .BackColor properties for your Symbol Factory Standard control instances.

  3. Be cautious about changing your desktop theme settings on the operating system. If changing these settings causes the color of your form to change, which it can, after you have built your application, your Symbol Factory Standard controls will no longer have backgrounds that match your form. This is particularly important when you are designing on one computer and deploying to a different one. Know the theme settings on your deployment machine before starting.

  4. Use the .Padding and .Stretch properties if you need to have Symbol Factory Standard control instances touching each other closely.


Analog Color Fill Mode (Standard Control)

Installed with the product is a VB6 example that uses Analog Color Fill animations on a standard control.

Color

Clicking on the color box next to each band provides a color picker for the purposes of setting the color used in that band along with the selected Style.

Breakpoints

When analog color fill is enabled (AnimationMode = 1 - Analog Color fill), text boxes appear to allow you to enter breakpoints. These breakpoints define the transition points between the bands of color. The number of breakpoints shown is equal to the number of bands minus 1.

For example, if you have 5 bands enabled, then there are 4 breakpoints.

Enter values that correspond to the range of the analog value you plan to pass to the control in the AnalogValue1 property. You can enter any valid double-precision floating point value for AnalogValue1 and for the breakpoints.

NOTE: You should enter your breakpoints with the lowest breakpoint at the bottom of the screen and work up the screen in value. For example, in the screen shown above, the following table shows how the symbol will behave based on some sample values of AnalogValue1.

Value of AnalogValue1 Property | Band that is active | Appearance of Graphic
5 | Band 5 | Blink Shaded Red
15 | Band 4 | Shaded Yellow
25 | Band 3 | Original Color
85 | Band 2 | Shaded Yellow
95 | Band 1 | Blink Shaded Red

If you wish to set the breakpoints or band styles in code dynamically, they are addressed by the following properties:

Band1Breakpoint to Band4Breakpoint
Band1Style to Band5Style
Band1Color to Band5Color


Analog Color Fill Mode (Cutaway Control)

Installed with the product is a VB6 example that uses Analog Color Fill animations on a cutaway control.

Color

Clicking on the color box next to each band provides a color picker for the purposes of setting the color used in that band along with the selected Style.

Breakpoints

When analog color fill is enabled (AnimationMode = 1 - Analog Color fill), text boxes appear to allow you to enter breakpoints. These breakpoints define the transition points between the bands of color. The number of breakpoints shown is equal to the number of bands minus 1.

For example, if you have 5 bands enabled, then there are 4 breakpoints.

Enter values that correspond to the range of the analog value you plan to pass to the control in the Level property. You can enter any valid double-precision floating point value for Level and for the breakpoints.

You should enter your breakpoints with the lowest breakpoint at the bottom of the screen and work up the screen in value. For example, in the screen shown above, the following table shows how the symbol will behave based on some sample values of Level.

Value of Level Property | Band that is active | Appearance of Cutaway
5 | Band 5 | Blink
15 | Band 4 | Yellow
25 | Band 3 | Original Color
85 | Band 2 | Yellow
95 | Band 1 | Blink

If you wish to set the breakpoints or band styles in code dynamically, they are addressed by the following properties:

Band1Breakpoint to Band4Breakpoint
Band1Style to Band5Style
Band1Color to Band5Color


Discrete Color Fill Mode (Standard Control)

Installed with the product is a VB6 example that uses Discrete Color Fill animations on a standard control.

Color

Clicking on the color box next to each band provides a color picker for the purposes of setting the color used in that band along with the selected Style. When the AnimationMode property is set to 2 - Discrete Color Fill, the Style selections are enabled.

Discrete Value Breakpoints

Discrete animation is controlled by passing True/False values to 5 properties named DiscreteValue1 to DiscreteValue5. Based on the combination of these properties that are on, one of the bands of animation is chosen.

The way the band is chosen by the control is by looking at the state of DiscreteValue1 first and going to down until it encounters a True in one of the DiscreteValue properties. The lowest numbered DiscreteValue property that is on is the band that will be on. For example, if DiscreteValue3, 4 and 5 are on, then Band 3 will be enabled. The following table gives you some examples of the various combinations of the states of the DiscreteValue properties and the resulting enabled band.
DiscreteValue1 | DiscreteValue2 | DiscreteValue3 | DiscreteValue4 | DiscreteValue5 | Band Enabled
True | False | False | False | False | Band 1
False | True | False | False | False | Band 2
False | False | True | False | False | Band 3
False | False | False | True | False | Band 4
False | False | False | False | True | Band 5
True | True | True | True | True | Band 1
False | True | True | True | True | Band 2
True | False | False | False | True | Band 1
False | False | True | True | False | Band 3
False | False | False | False | False | No band active

Note that if all the DiscreteValue properties are False, then the symbol will be displayed in its normal state as defined by the style tab.

The appearance of each band is set using the style selections shown next to each band.

If you wish to set the breakpoints or band styles in code dynamically, they are addressed by the following properties:

DiscreteValue1 to DiscreteValue5
Band1Style to Band5Style
Band1Color to Band5Color


Discrete Color Fill Mode (Cutaway Control)

Installed with the product is a VB6 example that uses Discrete Color Fill animations on a cutaway control.

When the AnimationMode property is set to 2 - Discrete Color Fill, the Style selections are enabled. Discrete animation is controlled by passing True/False values to 5 properties named DiscreteValue1 to DiscreteValue5. Based on the combination of these properties that are on, one of the bands of animation is chosen.

The way the band is chosen by the control is by looking at the state of DiscreteValue1 first and going to down until it encounters a True in one of the DiscreteValue properties. The lowest numbered DiscreteValue property that is on is the band that will be on. For example, if DiscreteValue3, 4 and 5 are on, then Band 3 will be enabled. The following table gives you some examples of the various combinations of the states of the DiscreteValue properties and the resulting enabled band.
DiscreteValue1 | DiscreteValue2 | DiscreteValue3 | DiscreteValue4 | DiscreteValue5 | Band Enabled
True | False | False | False | False | Band 1
False | True | False | False | False | Band 2
False | False | True | False | False | Band 3
False | False | False | True | False | Band 4
False | False | False | False | True | Band 5
True | True | True | True | True | Band 1
False | True | True | True | True | Band 2
True | False | False | False | True | Band 1
False | False | True | True | False | Band 3
False | False | False | False | False | No band active

Note that if all the DiscreteValue properties are False, then the symbol will be displayed in its normal state as defined by the style tab.

The appearance of each band is set using the style selections shown next to each band.

If you wish to set the breakpoints or band styles in code dynamically, they are addressed by the following properties:

DiscreteValue1 to DiscreteValue5
Band1Style to Band5Style
Band1Color to Band5Color


Using Controls in an Array

Symbol Factory ActiveX controls can be used in Control Arrays whenever needed. Some programmers do this to make referencing multiple instances of the control easier in their code.

For example, if you had 10 tanks you could use 10 instances named SFStandard1, SFStandard2, SFStandard3, etc.

However, you would need 10 lines of code to pass an Analog Value to all 10 tanks.

The more effective way would be to:

  1. Create the first tank and configure it the way you will want it and the other 10 tanks on the screen to appear

  2. Set the .Name property of the control to an intuitive name - i.e. FermentationTanks

  3. Then use the Copy & Paste function in VB to copy the first instance of the control 9 times. The first time you click Paste you will be asked if you want to create a control array. Say Yes.

  4. You will end up with 10 tanks on your form named FermentationTanks(0), FermentationTanks(1), FermentationTanks(2)..... FermentationTanks(9).

Now when its time to pass a value to their AnalogValue1 properties, you can use a looping structure if you want.

Another useful place to use controls in an array is with the pushbuttons in the 3-D Pushbuttons category. See the application note on Dynamic Pushbuttons for details and the sample program included with the product.


Connecting to OPC Servers

If you have the need to connect the Symbol Factory ActiveX controls to data in an OPC server, we suggest you look at our OPC ActiveX Control at www.opcactivex.com. With this component you can bind values from OPC servers directly to the properties of the Symbol Factory ActiveX control, without writing any code! Configuration is point and click. A free demo is available at the OPC Data Control website.

For example, all you have to do is point and click to bind a process tag to the .AnalogValue1 property with Analog Color Fill Animations setup.

The OPC Data Control has been OPC Interoperability tested with over 70 OPC servers and will connect to OPC Data Access 1.0 and 2.0 servers.

In the example below we have a tank with a cutaway control whose Level Property we will bind to a tag in an OPC server.

Notice the OPC Data ActiveX icon on the form below. The control is invisible at runtime. Right clicking on it brings up its property pages.

The OPC Data Control's General Tab is used to configure

connection defaults. Usually users leave these at their defaults

The OPC Server tab is used to pick the target OPC Server. We

have chosen the simulation OPC server that comes with the

OPC Data control here.

The connections tab is where the work gets done. Here we have

browsed for an OPC item named Tank1.Act and bound it to the

Level property of the Symbol Factory Cutaway Control.


Dynamic Pushbuttons

In Symbol Factory ActiveX 2.0, a new category titled 3-D pushbuttons was added. There are 10 images that can be used to simulate a pushbutton moving in and out included in the library. T

You may also want to look at our Industrial Gadgets ActiveX product if you would like even more realistic pushbuttons with legend plates, illumination and more and don't want to do the work of setting them up like we do in this application note.

The objects in Symbol Factory ActiveX are intended for doing basic pushbuttons, whereas the Industrial Gadgets ActiveX was designed to replicate reality as closely as possible. Bundles including both products are available.

Below is the property page for the Symbol Factory Standard Control with the 3-D Pushbuttons category selected.

Included with the Symbol Factory ActiveX is a sample program that shows a momentary and a latching pushbutton. We encourage you to review that application to see how the buttons were made to interact with other controls on the form to control Discrete Color Fill Animations.

In the example below we will create an animated momentary pushbutton.

Step 1.

Place a single instance of a Standard Control on a form, and pick a pushbutton. We typically start with the Not-Pressed position as shown below. Adjust the size of the control to be the exact size that you wish the final result to be and go ahead and set any properties you wish to change now.

Step 2.

Select the control and press Ctrl-C or click Edit-Copy

Then press Ctrl-V or click Edit-Paste.

The dialog below will be shown. Say Yes.

Your form will now appear as shown below. Notice how the new instance is placed on top of the old one. DO NOT MOVE IT YET!

Step 3:

Bring up the properties page for the new instance of the control and select the red pushbutton (or whichever one you chose) in the PRESSED position, giving result as shown below:

Step 4:

Now hold down the SHIFT key and click on the part of the original pushbutton that is showing through so that both are selected as shown below.

Then from the VB menu click on:

  1. Format->Align->Centers

  2. Format->Align->Middles

This will get the buttons lined up exactly on top of each other as shown here.

VERY IMPORTANT STEPS:

  1. Now on the VB properties page (as opposed to our custom properties page), go to the control instance named SFStandard1(1) - this is the 2nd one we placed and is the one in the pressed position. Set its .Visible property to FALSE.

  2. Now right click on the instance that is still on top, the Pressed one, and select "Send to Back" which will put the "Not Pressed" one on top as shown below:

NOTE: If you do not have the Visibility properties and order of layering of these controls right, this will not work!

Step 5:

Now we will add the code that actually flip/flops between the control instances at runtime based on the user clicking on the pushbutton.

Double click on the control to bring up the code window as shown below.

Now select the MouseDown event as we will use the MouseDown and MouseUp Events to change which instance of the control is visible at any given time.

We are going to use the .Visibility property of our two instances in the array of controls to flip which one is visible. This is done using the following simple code:

Private Sub SFStandard1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)

SFStandard1(0).Visible = Not SFStandard1(0).Visible

SFStandard1(1).Visible = Not SFStandard1(1).Visible

End Sub

Private Sub SFStandard1_MouseUp(Index As Integer, Button As Integer,

Shift As Integer, x As Single, y As Single)

SFStandard1(0).Visible = Not SFStandard1(0).Visible

SFStandard1(1).Visible = Not SFStandard1(1).Visible

End Sub

NOTE: If you are also in these events going to write to a PLC then please make your code as efficient as possible so as to not miss the "Mouse Up" event. It is the nature of VB6 that if you spend too much time in your code in a MouseDown event, you can miss the MouseUp Event. If this is a problem for you then you should use our Industrial Gadgets ActiveX control instead as it handles all of this switching of images inside the product and thus does not have this type of problem as a concern.


Working with Visual Basic

This documentation applies to Visual Basic version 5 or 6.

Referencing the Symbol Factory Controls in an Application
Inserting a Symbol Factory Control on a Form
Choosing a Symbol Factory Image
Resizing the Symbol Factory Image
Passing an Analog Value to a Symbol Factory Control to control Analog Animation
Passing a Discrete Value to a Symbol Factory Standard Control to control Discrete Animation
Creating an Animated and Filled Tank Using the Symbol Factory Controls
Using Events in Visual Basic and Setting Other Symbol Factory Properties from Code


VB - Referencing the Symbol Factory Controls in an Application

Referencing the Symbol Factory Controls in a VB 5/6 Application

After installing the Symbol Factory ActiveX controls from the product CD, you must also reference the components in your Visual Basic 5/6 Application.

  1. On the Visual Basic menu, click on Project -> Components or press Ctrl-T to bring up the components dialog box
  2. Select "Symbol Factory Controls" by checking the check box next to "Symbol Factory Controls" in the list of available components
  3. Click the Apply button
  4. Click the Close button
  5. Two controls will be added to the Visual Basic toolbox as shown here. The icons represent the Symbol Factory Standard and Symbol Factory Cutaway controls respectively.
Symbol Factory Standard Control
Symbol Factory Cutaway Control


VB - Inserting a Symbol Factory Control on a Form

Inserting a Symbol Factory Control on a Form

To insert a Symbol Factory control into a Visual Basic form:

  1. Click on the icon in the Visual Basic toolbox for the desired control (Standard or Cutaway).
  2. Click and drag the mouse pointer then release it to place an instance of the control at the desired size anywhere on a VB form.


VB - Choosing a Symbol Factory Image

Choosing a Symbol Factory Image

  1. Place an instance of a Symbol Factory Standard control onto a Visual Basic form
  2. Right click on the mouse with the pointer over the Symbol Factory Standard Control
  3. Select "Properties" on the menu that appears - This will bring up the Symbol Factory Standard Control property sheet
  4. Select any symbol, then click the OK button.


VB - Resizing the Symbol Factory Image

Resizing the Symbol Factory Image

There are two ways to resize the Symbol Factory controls -- proportionally and non-proportionally.

Proportional Resizing -- maintains the ratio of the height and width of the graphic shown in the control to maintain the proper perspective

  1. Select the instance of the control you wish to resize on the form
  2. Use the handles on the control to resize the control like any other control in Visual Basic such as a text box, label, etc.
  3. The control will maintain the proper proportions in the graphic regardless of your attempts to scale it in a non-proportional manner.
Non-Proportional Resizing -- allows you to resize the control without necessarily maintaining the height and width proportions.

  1. With an instance of the Symbol Factory Standard control, bring up the Symbol Factory Standard Control property sheet and click on the Style Tab and check the "Stretch" checkbox
  2. Click the OK button
  3. You may now resize the control in any fashion you want without regards to proportions.


VB - Passing an Analog Value to a Symbol Factory Control to control Analog Animation

Passing an Analog Value to a Symbol Factory Control to control Analog Animation

  1. Place an instance of the Symbol Factory Standard Control on your form and pick an image you would like to animate
  2. Right click on the control and bring up the Symbol Factory Standard Control property sheet
  3. Select the Animation tab
  4. Select "1 - Analog Color Fill" for the AnimationMode property
  5. Select the number of bands of animation you wish to have (1 to 5)
  6. Set the Style of Animation and Color for each band
  7. Set the Breakpoints for when you want the animation to change
  8. Click on the Apply button
  9. Pass the value that you want to control the animation to the control using the following syntax:

    SFStandard1.AnalogValue1 = double precision integer

Example:

SFStandard1.AnalogValue1 = 50

Or

SFStandard1.AnalogValue1 = dblUserVariable


VB - Passing a Discrete Value to a Symbol Factory Standard Control to control Discrete Animation

Passing a Discrete Value to a Symbol Factory Standard Control to control Discrete Animation

  1. Place an instance of the Symbol Factory Standard Control on your form and pick an image you would like to animate
  2. Right click on the control and bring up the Symbol Factory Standard Control property sheet
  3. Select the animation tab
  4. Select "1 - Discrete Color Fill" for the AnimationMode property
  5. Select the number of bands of discrete animation you wish to have (1 to 5)
  6. Set the Style of Animation and Color for each band
  7. Click on the Apply button
  8. Pass the values that you want to control the bands of discrete animation to the control using the following syntax:

    SFStandard1.DiscreteValue1 = True or False

Through

SFStandard1.DiscreteValue5 = True or False

Example:

SFStandard1.DiscreteValue1 = True

Or

SFStandard1.DiscreteValue1 = blnUserVariable

Note: If more than one band is chosen and more than one of the DiscreteValueX (x = 1 to 5) properties is set to true, the control sets the highest priority to the setting of DiscreteValue1 and works its way down.

Example:

Symbol Factory Control Setup as shown below:

The following table describes how the control will appear based on a variety of combinations of the DiscreteValue1 through DiscreteValue3 properties:

DiscreteValue1 | DiscreteValue2 | DiscreteValue3 | Appearance of the Control
True | False | False | Red and Grey Blink Shaded (Band 1)
False | True | False | Yellow Shaded (Band 2)
False | False | True | Green Shaded (Band 3)
True | True | False | Red and Grey Blink Shaded (Band 1 takes priority over 2)
True | True | True | Red and Grey Blink Shaded (Band 1 takes priority over 2 and 3)
False | True | True | Yellow Shaded (Band 2 takes priority over band 3)


VB - Creating an Animated and Filled Tank Using the Symbol Factory Controls

Creating an Animated and Filled Tank Using the Symbol Factory Controls

  1. Place an instance of the Symbol Factory Standard Control on a form
  2. Bring up the Symbol Factory Standard Control property sheet
  3. Select a tank image from the "Tanks" category
  4. Click the OK button
  5. Place an instance of the Symbol Factory Cutaway Control on the form and position it on top of the tank image you placed on the form.
  6. Right click on the Symbol Factory Cutaway Control and select Properties on the menu that appears. This will bring up the Symbol Factory Cutaway Control property sheet.

  7. Set the LevelMax and LevelMin properties to match the range of values you will be passing to the control. You may also choose to set these properties from your Visual Basic program using the syntax:
SFCutaway1.LevelMin = double precision integer value
SFCutaway1.LevelMax = double precision integer value

Examples:

Dim dblMyLevelMax as Double

dblMyLevelMax = 5000

SFCutaway1.LevelMax = dblMyLevelMax

Or

SFCutaway1.LevelMax = 5000

Where SFCutaway1 is the name of the instance of the control on the form that you wish to set these properties for.

  8. Pass the value representing the tank level to the control in your Visual Basic code using the syntax:

SFCutaway1.Level = double precision integer value

The value you pass should be within the bounds of the LevelMax and LevelMin properties. If you are using a 3rd party ActiveX control to provide your PLC data communications, many of those controls return data and notify you of new data with an event being fired by that control.

A good way to handle updating the tank level would be to put this code to pass the tank level value to the Symbol Factory Cutaway control in the Read Done event handler for your PLC ActiveX control.


VB - Using Events in Visual Basic and Setting Other Symbol Factory Properties from Code

Using Events in Visual Basic and Setting Other Symbol Factory Properties from Code

The Symbol Factory Controls support the standard range of Visual Basic events. You may use these events to trigger actions in your program. A common example might be to let someone click on a motor to send a value to the PLC to start the motor.

If you had a Symbol Factory Standard Control on a form with a motor image chosen as shown below:

  1. Double click on the Symbol Factory Standard Control
  2. The Visual Basic Code editor window appears and places you in the SFStandard1 Click event handler routine.
  3. Enter your code in the subroutine for what you want to happen.

Private Sub SFStandard1_Click()

Enter your VB code here for the actions you want taken

When someone clicks on the control you placed on the form

End Sub

Example using Symbol Factory properties - These examples also demonstrate setting the various properties available on the Style tab of the Symbol Factory Standard Control Property sheet from code rather than from the property sheet.

Example 1

When the user clicks on the motor, have it change colors from the default color to red shaded and back to the default in an alternating manner with each click.

Private Sub SFStandard1_Click()

If SFStandard1.FillColorMode = Original Then

SFStandard1.FillColorMode = Shaded

SFStandard1.FillColor = vbRed

Else

SFStandard1.FillColorMode = Original

End If

End Sub

Example 2

When the user clicks on the motor, have it stop blinking if it was already blinking or start blinking if it was stopped.

Private Sub SFStandard1_Click()

If SFStandard1.BlinkMode = NoBlink Then

SFStandard1.BlinkMode = BlinkShaded

SFStandard1.BlinkColor = vbRed

Else

SFStandard1.BlinkMode = NoBlink

End If

End Sub


Working With VB.NET

Visual Basic.NET Quick Start Guide

The Symbol Factory ActiveX control Version 2.0 Build 139 and higher is supported for use with Visual Basic .NET 2003 in Windows Forms Applications. The product ships with a sample VB.NET program and source code for your reference.

The screens used here will be built using VB.NET in Visual Studio 2003.

This Quick Start Guide assumes that you

  • Are already familiar with Visual Basic .NET

  • That you realize that there are many differences between Visual Basic 6 and Visual Basic .NET that are beyond the scope of this Quick Start Guide.

We will go through the same steps as our VB6 Quick Start Guide to produce the same end result application.

Except for a few specific syntax differences in the naming of objects and how parameters are passed in event handlers, you will notice in this sample that the use of the product in VB.NET is nearly the same as it is in Visual Basic 6.


Adding the Controls to VB.NET

Visual Basic .NET Quick Start Guide

Adding the Controls to Visual Basic .NET

Start VB.NET and create a "Windows Application" which creates a basic application with a single Windows Form in it.

The best way to add the Symbol Factory ActiveX components to your VB.Net environment is to add them to the VB.NET Toolbox. By doing this, the components will be available to any application you build but references to the controls will only be added to a specific project when you use the controls.

You may add the Symbol Factory ActiveX components to any of the Toolboxes found in VB.NET. For this example, we will add them to the Components toolbar.

Right click on the Components toolbar and select "Add/Remove Items" on the resulting menu shown here.

This will display the screen shown below. On the COM Components tab, look for the Symbol Factory Controls as shown below. If you do not find them, click the browse button and locate the file SymFacX.ocx. By default it is installed at \program files\software toolbox\symbol factory activex 2.0. There are two controls that you will need to select as shown below.

Click OK and the components will be added to your Components Toolbox as shown below. You may choose to add one or both of the components found in this product to your toolbox. The controls appear as Symbol Factory Cutaway and Symbol Factory Standard as shown below.

Next Step - Adding a control to a Windows Form


Adding a Control to a Windows Form

Visual Basic .NET Quick Start Guide

Adding a Control on a Form

Adding objects to a VB.NET form is no different than what you might be used to in Visual Basic 6.0

To add an object to a Visual Basic .NET form, you can

  1. In the VB.NET Toolbox that you added the controls to, double click on the object type you wish to add. This places a single instance of an object on the form at the default size, with the default object for the class chosen.

or

  2. Click one time on the desired object type in the toolbox containing the controls, then click and drag to place an instance of the object on the form at your chosen size.

In the sample shown on this page, we have placed an instance of the Standard Control, which defaults to its standard pump object, and a cutaway control. We have also placed an instance of the Standard Control and changed the appearance to a green motor, which you will see how to do in your next step.

Note: The Symbol Factory ActiveX Standard Control will automatically match its background color to the background of your form.

Next Step: Choosing a Symbol to Display


Visual Basic .NET Quick Start Guide

Choosing Symbol to Display

  1. Place an instance of a Symbol Factory Standard control onto a Visual Basic .NET form as shown in the previous step.
  2. Right click on the mouse with the pointer over the Symbol Factory Standard Control
  3. Select "Properties" or "Activex-Properties" on the menu that appears. Either one will work. This will bring up the Symbol Factory Standard Control property sheet.
  4. Select any symbol, then click the OK button.
  5. You can repeat this process on as many instances of the Standard Control as you wish.

Selecting a Symbol

The End Result:

Next Step - Resizing the Control


Resizing the Control

Visual Basic .NET Quick Start Guide

Resizing the Standard Control

There are two ways to resize the Symbol Factory Standard controls -- proportionally and non-proportionally. Which method of resizing is used is controlled by the value of the .Stretch property.

Proportional (Non-Stretched) Resizing

Maintains the ratio of the height and width of the graphic shown in the control to maintain the default ratio of width to height, also sometimes called the "Aspect Ratio".

  1. Select the instance of the control you wish to resize on the form
  2. Use the handles on the control to resize the control like any other control in Visual Basic such as a text box, label, etc.
  3. The control will maintain the proper proportions in the graphic regardless of your attempts to scale it in a non-proportional manner.

Example of a Proportionally Sized Control using the pump from the previous step:

Non-Proportional (Stretched) Resizing

This method of stretch does not require you to maintain the ratio of the height and width of the graphic shown in the control to maintain the default ratio of width to height, also sometimes called the "Aspect Ratio". Stretching is typically used for two reasons:

  1. This allows you to distort the object or make it a different overall shape

  2. You are using a container that doesn't allow for transparent backgrounds in ActiveX controls, which VB.NET is one of, and you wish to make 2 controls adjoin each other closely. Setting the Stretch Property to True and adjusting the .Padding property allows you to do this.

To Stretch or Resize a control non-proportionally:

  1. With an instance of the Symbol Factory Standard control, bring up the Symbol Factory Standard Control property sheet and click on the Style Tab and check the "Stretch" checkbox as shown below:

  2. Click the OK button
  3. You may now resize the control in any fashion you want without regards to proportions.

Example of a control resized with Stretch set to true:

Next Step - Changing the Controls' Appearance


Changing a Controls Appearance

Visual Basic .NET Quick Start Guide

Changing a Control's Appearance

Once you place a control on your form, choose your symbol, and get it sized the way you like it, you can make additional adjustments to its appearance using the Style and Animations tabs on the Standard Controls' property pages.

Style Tab:

The Style tab allows you to adjust the Fill color and Fill Color Mode, Background Color, Orientation, and Blinking state of the control.

See Symbol Factory Standard Control Properties for full details of these properties. Any of the properties that are shown on the Style Tab can be changed at runtime by using the corresponding property name. The captions on each property on the Style tab match the property name that you would use in code.

In the example below, we have flipped the pump from the previous step and changed its fill color to Shaded and the Fill color to green.

Resulting control appearance:

(remember we have stretched the object in the previous step)

Animation Tab:

The Animation tab is used to setup the built in animations that the Symbol Factory Standard controls can perform.

The Animations allow you to have the ActiveX control determine the color, fill style, and blink state of an object based on an Analog Value that you provide to the control and associated breakpoints you configure, or based on the combination of a set of Discrete Values.

The objective of the Animations is to save you the work of comparing process variables to a set of rules and then setting the properties yourself in your own script or code. Simply pass in the process variable to the AnalogValue1 property (or the DiscreteValue properties) and the ActiveX control will do the rest of the work for you.

Animations can save you many hours of work, and more importantly, significant time troubleshooting your code.

For more details on how to use Animations, we strongly encourage you to review these links:

Animations - Analog Color Fill Mode

Animations - Discrete Color Fill Mode

Below is a sample of the Animations Tab applied to the control we have been using this tutorial with Analog Color Fill animation enabled with 5 bands of animation.

You would pass your process value to the .AnalogValue1 property and the control will compare it against the breakpoints shown below to determine which band of animation to display. Please pay close attention to the NOTES: section at the bottom of the Animations tab page when setting up Animations.

Next Step - Referencing the Controls from Code


Visual Basic .NET Quick Start Guide

Referencing the Controls from Code

Now we will take an example of how to change one of the control's properties from code in VB.NET.

We will take the object as it was setup at the end of the Resizing the Control step and add buttons to our form that when clicked will change the Fill Color of the control between Green and Yellow.

Add two Windows Forms Button to your VB.NET application using the VB.NET toolbar as shown at the right. Set the Text properties of the buttons to Green and Yellow as shown below.

Your form will now appear as shown below:

Before we can reference our symbol in code, we need to know the name of the object instance. To do this, click on the Symbol Factory Standard control on your form and look at the VB properties sheet This is not the custom property sheet for the control we have been using but rather is shown in the VB.NET development environment as below. You can see our control instance is named AxSFStandard1. We will use this name in code to reference this instance of the control.

If you have multiple instances of the control, they may have names like AxSFStandard2, etc. You can certainly change the name by changing the (Name) property of the control using the VB.NET properties page, but you MUST DO SO BEFORE you start writing code!

Now that we know the name of the control we want to reference, double click on the button that we added earlier. This opens the VB.NET code window as shown below.

Inside the Private Sub Button1_Click routine, we will enter the following code:

AxSFStandard1.FillColorMode = SYMFACXLib.FillColorModeEnum.Shaded

AxSFStandard1.FillColor = System.Drawing.Color.Green

Inside the Private Sub Button2_Click routine, we will enter the following code:

AxSFStandard1.FillColorMode = SYMFACXLib.FillColorModeEnum.Shaded

AxSFStandard1.FillColor = System.Drawing.Color.Yellow

Now you can run your application and by clicking on the buttons, change the color of the object.

You will notice that we used the VB.NET System.Drawing.Color namespace to obtain color constants to use.

Next step - passing an Analog Value to the Control to use with Analog Color Fill Animations


Visual Basic .NET Quick Start Guide

Passing an Analog Value to the Control

Now that you know how to pass reference the ActiveX control in VB.NET, you can make use of the Analog Color Fill Animations.

See also:

Analog Color Fill - Standard Control

Analog Color Fill - Cutaway Control

To make use of Analog Color Fill Animations you must

  1. Enable them from the Animations Tab of an instance of either the Standard or Cutaway control

  2. Configure the appearance and breakpoints on the Animations tab

  3. Pass in your process variable to the AnalogValue1 property

Animation configurations are independent of one another from one instance of the control to another.

For purposes of this example, assume that you have an instance of a Standard Control named AxSFStandard1.

The code to pass in the analog value will be:

AxSFStandard1.AnalogValue1 = YourData

Note that the data type of the .AnalogValue1 property is Double, which in VB means it is a floating point value. You can use VB data type conversions to convert your data if it is not already a floating point value.

Whenever the control receives a new value for .AnalogValue1, it checks to see if animations are enabled. If they are then the control evaluates the value of AnalogValue1 against the breakpoints setup on the Animations tab and changes the control's appearance based on how you have it configured.

Next step - passing a Discrete Value to the Control to use with Discrete Color Fill Animations


Passing a Discrete Value to the Control

Visual Basic .NET Quick Start Guide

Passing Discrete Values to the Control

Now that you know how to pass reference the ActiveX control in VB.NET, you can make use of the Discrete Color Fill Animations.

See also:

Discrete Color Fill - Standard Control

Discrete Color Fill - Cutaway Control

To make use of Discrete Color Fill Animations you must

  1. Enable them from the Animations Tab of an instance of either the Standard or Cutaway control

  2. Configure the appearance and breakpoints on the Animations tab

  3. Pass your discrete values to the the DiscreteValue1 to DiscreteValue5 properties

Animation configurations are independent of one another from one instance of the control to another.

For purposes of this example, assume that you have an instance of a Standard Control named AxSFStandard2.

The code to pass in discrete values will be:

AxSFStandard2.DiscreteValue1 = YourData

Note that the data type of the DiscreteValue properties is boolean, which means we expect a 0 or 1, 0 or -1, or False/True value.

Whenever the control receives a new value for any of the .DiscreteValueX properties, it checks to see if animations are enabled. If they are then the control evaluates the values of the DiscreteValueX properties against the breakpoints setup on the Animations tab and changes the control's appearance based on how you have it configured.

NOTE: Please see the truth tables for the Standard and Discrete Controls for details on how this control works when more than one DiscreteValue property is set to True.

Standard Control - Discrete Animation Truth Table

Cutaway Control - Discrete Animation Truth Table

Next step - passing a Discrete Value to the Control to use with Discrete Color Fill Animations


Visual Basic .NET Quick Start Guide

Creating Animated Tank

  1. Place an instance of the Symbol Factory Standard Control on a form
  2. Bring up the Symbol Factory Standard Control property sheet
  3. Select a tank image from the "Tanks" category
  4. Click the OK button
  5. Place an instance of the Symbol Factory Cutaway Control on the form and position it on top of the tank image you placed on the form.
  6. Right click on the Symbol Factory Cutaway Control and select Properties on the menu that appears. This will bring up the Symbol Factory Cutaway Control property sheet.

  7. Set the LevelMax and LevelMin properties to match the range of values you will be passing to the control. You may also choose to set these properties from your Visual Basic program using the syntax:

AxSFCutaway1.LevelMin = double precision integer value

AxSFCutaway1.LevelMax = double precision integer value

Examples:

Dim dblMyLevelMax as Double

dblMyLevelMax = 5000

AxSFCutaway1.LevelMax = dblMyLevelMax

Or

AxSFCutaway1.LevelMax = 5000

Where SFCutaway1 is the name of the instance of the control on the form that you wish to set these properties for.

  8. Pass the value representing the tank level to the control in your Visual Basic code using the syntax:

AxSFCutaway1.Level = double precision integer value

The value you pass should be within the bounds of the LevelMax and LevelMin properties. If you are using a 3rd party ActiveX control to provide your PLC data communications, many of those controls return data and notify you of new data with an event being fired by that control.

A good way to handle updating the tank level would be to put this code to pass the tank level value to the Symbol Factory Cutaway control in the Read Done event handler for your PLC ActiveX control.

If you are using an OPC Server, we recommend that you use our OPC Data Control to pass data from the OPC Server to these objects.

Next Step - Using Events


Visual Basic .NET Quick Start Guide

Using Events

The Symbol Factory Controls support the standard range of Visual Basic events. You may use these events to trigger actions in your program. A common example might be to let someone click on a motor to send a value to the PLC to start the motor.

If you had a Symbol Factory Standard Control on a form with a motor image chosen as shown below:

  1. Double click on the Symbol Factory Standard Control

  2. The VB.NET Code editor window appears and places you in the AxSFStandard1 Enter event handler routine. To pick other events, use the combo box at the top of the VB.NET code editor. Below we have added the ClickEvent

  3. Enter your code in the subroutine for what you want to happen. The sample below has abbreviated the subroutine header that VB.NET creates as the list of arguments passed into the event by VB.NET is numerous.

Private Sub AxSFStandard1_ClickEvent()

Enter your VB code here for the actions you want taken

When someone clicks on the control you placed on the form

End Sub

Please refer to the VB.NET documentation that came with Visual Studio .NET for details on these events.


Using With Intellution iFix Quick Start Guide

Inserting Controls into iFix

  1. In the Intellution iFix Workspace, select the picture you want to place the Symbol Factory control on

  2. Click on Insert -> OLE Object on the menu bar

  3. Select one of the Symbol Factory Controls - -Symbol Factory Standard Control or Symbol Factory Cutaway Control from the resulting dialog box

  4. Click OK and the object will be placed on your Picture as shown below

Next Step - Selecting the Image


Using With Intellution iFix Quick Start Guide

Selecting an Image

To select an image from the Symbol Factory library:

  1. Place your mouse pointer over the Symbol Factory Standard ActiveX control you inserted and right click

  2. Select "Properties - Symbol Factory Standard Control Object" from the menu that appears

  3. The Symbol Factory Standard Control properties sheet is displayed

  4. Select your graphic from a category

  5. Click OK and the graphic is displayed

NOTE: In step 2 be sure you select " Properties - Symbol Factory Standard Control Object" and not "Property Window" in the menu shown at the right

Next Step - Setting Properties


Using With Intellution iFix Quick Start Guide

Setting Properties

There are three ways you can access the properties for the Symbol Factory controls that control such actions as flipping, rotation, fill colors, and animation bands as described under the detailed properties descriptions in this help file.

  1. Access them via the custom property pages as described in the previous step and in the help file for this product

  2. Access them via your VBA code in Intellution using the syntax shown in the detailed property descriptions for each control in the product help file

  3. Use Intellution's own property window which looks just like the Visual Basic generic properties window. To use this option follow these directions:

a) Place a Symbol Factory control on a form

b) Right click over the Symbol Factory control with your mouse and select "Property Window" on the menu that appears and is shown here.

c) The Intellution Property Window will appear as shown at the right.

On this properties page you can set most of the Symbol Factory control's properties.

Please note that if you want an more intuitive user interface for setting properties, you should use the selection from the menu above "Properties .. Symbol Factory Standard Control Object" or if using the Cutaway control the selection "Properties .. Symbol Factory Cutaway Control Object"

Note: At this time the following properties are not accessible from the Intellution Properties page - they are accessible through the Symbol Factory custom property pages accessible as described in the previous paragraph or through VBA Code:

Standard Control:

  • Stretch

Next Step - Connecting an iFix Tag


Using With Intellution iFix Quick Start Guide

Connecting to an iFix Tag

  1. Place a Symbol Factory Standard control on a picture and select the control

  2. Right click over the control and select "Animations"

  3. Select the Misc Tab on the dialog that appears - a list of properties is displayed

  4. To connect a tag to the AnalogValue1 property that controls the Analog Animation in the control, scroll down to the AnalogValue1 property

  5. Click on the checkbox next to AnalogValue1 in the Animate Column the detailed animation dialog is shown

  6. Select a Data Source from your Tag Database in the Data Source field. You can browse available tags by clicking on the button to the right of the Data Source field.

  7. Unless you want the iFix product to also perform conversions on the value you are passing, select "Object" in the Data Conversion combo box field.

  8. Click OK and the tag will now be tied to the AnalogValue1 property in the Symbol Factory Standard Control.

The same process is used to pass values to the .Level property in the Symbol Factory Cutaway Control, the DiscreteValue1 - DiscreteValue5 properties in the Symbol Factory Standard Control, or any other property in the Symbol Factory controls.

Next Step - Working with Events


Using With Intellution iFix Quick Start Guide

Working with Events in iFix

To write Visual Basic for Applications script that will be executed when one of the standard events on the Symbol Factory controls fires:

  1. Select the control you wish to write script for

  2. Right click on the control and select "Edit Script" from the menu that appears

  3. This opens the Visual Basic for Applications editor window and places you in the event handler routine for the object that you selected.

  4. Select the event you wish to right code for using the right combo box on the Code window for your object. In this example the "Click" event of the object "SFStandard1" is shown.

  5. You can address the Symbol Factory object you selected's properties using the object name shown in the code window -- SFStandard1 in this example.

For information on VBA syntax and instructions please refer to your iFix Automation Electronic help provided with the iFix product. This help file is accessible from the Visual Basic editor by clicking on Help->iFix Automation Help on the main menu bar.


RSView_Intro

Introduction to Working with RSView

This section is designed to cover both RSView32 and RSView Enterprise. Some information is presented separately due to minor differences between the container applications. Other information is presented in common, such as the application tips, for the information applies equally to both applications. We strongly recommend you review the application tip on adjoining objects as well as the other application tips if they apply to your application.

Getting started with RSView32 Works

Getting started with RSView Enterprise Studio

Application Tips

Deploying at Runtime


Working With RSView Enterprise

The Symbol Factory ActiveX control can be used in RSView Enterprise to create projects targeted for RSView SE Standalone, SE Distributed, and PE. RSView ME is supported for non-Windows CE target platforms.

Inserting a control

To insert an instance of the Symbol Factory ActiveX into your RSView display, click on the Control icon on the RSView toolbar.

Then drag and drop on the display where you want to place the ActiveX Control, which will display a list of the available ActiveX controls on your system. If the Symbol Factory ActiveX control has been properly installed, you will see two choices shown:

  • Symbol Factory Cutaway Control

  • Symbol Factory Standard Control

In this example we will insert an instance of the Symbol Factory Standard Control and connect it to an RSView tag.

Choosing the Symbol to Use

After you have inserted an instance of the Symbol Factory Standard Control into your RSView display, it will appear as shown here.

To choose which symbol to use, double click on the object or right click on the object in RSView and select Properties from the resulting menu as shown here.

The dialog shown below will be shown. From the Symbols tab you can choose from all of the categories of objects in the Symbol Factory ActiveX and pick the symbol you wish to have displayed in this instance of the control.

If you then click on the Style Tab you can set the default appearance of the object. Note that all of the Style properties can also be set from VBA code or bound to RSView tags allowing you to alter the appearance of the chosen object at runtime.

Note: RSView Enterprise does not presently support background transparency with ActiveX controls (more details), thus you will not be able to change the BackStyle property to 0-Transparent at design or runtime. However, the Symbol Factory ActiveX automatically matches the BackColor property to the background color of your RSView32 display when you insert an instance of the control.

By clicking on the Animation Tab, you can setup behaviors of the control that can be controlled at runtime by binding to RSView tags.

For example, you could setup a pump object so that based on an RSView tag named MotorSpeed, the pump would automatically change appearance:

  • When the motor speed is greater than 80 it will be yellow blinking.

  • When the motor speed is greater than 90 it will be red blinking

  • Otherwise the pump should retain its default appearance as set on the Style tab.

The properties page below shows how these animations are setup. In another step we will show you how to bind the RSView tag MotorSpeed to the ActiveX control. Below we have enabled Analog Color Fill animation mode and setup 3 bands of animation. We have set breakpoints of 80 and 90 with the Styles desired for each band.

Notice that at the bottom of the property page, we are told that Analog Color Fill animation is controlled by the value of the AnalogValue1 property. Now lets bind the AnalogValue1 property to an RSView tag named MotorSpeed.


Working with RSView

Working with RSView32 Works

Adding Controls to your Displays

The Symbol Factory ActiveX control can be used in RSView32 Works to create projects targeted for RSView32.

Inserting a control

To insert an instance of the Symbol Factory ActiveX into your RSView display, click on the Control icon on the RSView toolbar.

Then drag and drop on the display where you want to place the ActiveX Control, which will display a list of the available ActiveX controls on your system. If the Symbol Factory ActiveX control has been properly installed, you will see two choices shown:

  • Symbol Factory Cutaway Control

  • Symbol Factory Standard Control

In this example we will insert an instance of the Symbol Factory Standard Control and connect it to an RSView tag.

Choosing the Symbol to Use

After you have inserted an instance of the Symbol Factory Standard Control into your RSView display, it will appear as shown here.

To choose which symbol to use, double click on the object or right click on the object in RSView and select Symbol Factory Standard Control Object-->Properties from the resulting menu as shown here.

The dialog shown below will be shown. From the Symbols tab you can choose from all of the categories of objects in the Symbol Factory ActiveX and pick the symbol you wish to have displayed in this instance of the control.

If you then click on the Style Tab you can set the default appearance of the object. Note that all of the Style properties can also be set from VBA code or bound to RSView tags allowing you to alter the appearance of the chosen object at runtime.

Note: RSView32 does not support background transparency with ActiveX controls, thus you will not be able to change the BackStyle property to 0-Transparent at design or runtime. However, the Symbol Factory ActiveX automatically matches the BackColor property to the background color of your RSView32 display when you insert an instance of the control.

By clicking on the Animation Tab, you can setup behaviors of the control that can be controlled at runtime by binding to RSView tags.

For example, you could setup a pump object so that based on an RSView tag named PumpSpeed, the pump would automatically change appearance:

  • When the pump speed is greater than 80 it will be yellow blinking.

  • When the pump speed is greater than 90 it will be red blinking

  • Otherwise the pump should retain its default appearance as set on the Style tab.

The properties page below shows how these animations are setup. In another step we will show you how to bind the RSView tag PumpSpeed to the ActiveX control. Below we have enabled Analog Color Fill animation mode and setup 3 bands of animation. We have set breakpoints of 80 and 90 with the Styles desired for each band.

Notice that at the bottom of the property page, we are told that Analog Color Fill animation is controlled by the value of the AnalogValue1 property. Now lets bind the AnalogValue1 property to an RSView tag named PumpSpeed.


RSViewEnt_Binding Tags

Working with RSView Enterprise

Binding RSView tags to the Symbol Factory ActiveX

Binding tags in RSView Studio, the development environment for RSView Enterprise is very similar to the steps used in RSView32 Works.

Now that you have inserted a pump object and configured its animations, we will connect the pump object to an RSView tag named MotorSpeed. If you recall, we setup Analog Color Fill animation to cause the pump to change colors and blink based on the value of PumpSpeed.

Double click on or right click on the instance of the Symbol Factory ActiveX control you chose and select "Properties" from the menu as shown here.

This will bring up the property pages as shown below. Go to the Connections tab as shown below.

We will want to bind to the AnalogValue1 property.

Note: You may notice that the AnalogValue1 property is listed twice - once as _AnalogValue1 and once as AnalogValue1. This occurs because AnalogValue1 is the default property for the ActiveX control - when writing ActiveX controls, the default property gets listed as a "hidden" property with an "_" underscore character in front of it. Normally this is hidden; however, the RSView connections tab shows both. This isn't a problem. From an operational point of view it does not matter which one you bind to - inside the ActiveX the data shows up in the same place - so pick whichever one you want.

Notice that you can also bind RSView tags to many of the other properties of the ActiveX control, including the animation band settings for color, style, and breakpoint. By connecting these to RSView tags, you can create a single display that will operate differently based on the settings of RSView tags that you map to the control's animation settings. There are many creative uses possible for this feature.

Now lets bind MotorSpeed to the AnalogValue1 property:

Click on the small button to the right of the property you wish to bind to which will display the RSView tag picker as shown below. Select MotorSpeed, a tag we already defined or a tag of your choosing in your system, and click OK.

As shown previously on the connections tab, the tag MotorSpeed has now been bound to the _AnalogValue1 (same as AnalogValue1) property. So whenever this RSView tag changes values, RSView will automatically write the new value into the Symbol Factory ActiveX control's AnalogValue1 property.

You can now run your RSView application and test your animations. Below we've added an RSView Numeric display and Numeric Input to our Display so that we can type in a new value for motor speed. When the value of MotorSpeed is >= 80 the pump blinks yellow. When it is >= 90 it blinks red. the sequence of screens below shows this.


RSView32_BindingTags

Working with RSView32 Works

Binding RSView tags to the Symbol Factory ActiveX

Now that you have inserted a pump object and configured its animations, we will connect the pump object to an RSView tag named PumpSpeed. If you recall, we setup Analog Color Fill animation to cause the pump to change colors and blink based on the value of PumpSpeed.

Right click on the instance of the Symbol Factory ActiveX control you chose and select "ActiveX Property Panel" from the menu as shown here.

This will bring up the RSView32 property panel as shown below. Go to the Animations tab. We will want to bind to the AnalogValue1 property.

Note: You will see that the AnalogValue1 property is listed twice. This occurs because AnalogValue1 is the default property for the ActiveX control - when writing ActiveX controls, the default property gets listed as a "hidden" property with an "_" underscore character in front of it. Normally this is hidden; however, the RSView32 property panel shows both. From an operational point of view it does not matter which one you bind to - inside the ActiveX the data shows up in the same place - so pick whichever one you want.

Notice that you can also bind RSView tags to many of the other properties of the ActiveX control, including the animation band settings for color, style, and breakpoint. By connecting these to RSView tags, you can create a single display that will operate differently based on the settings of RSView tags that you map to the control's animation settings. There are many creative uses possible for this feature.

Now lets bind PumpSpeed to the AnalogValue1 property:

Click on the small button to the right of the property you wish to bind to which will display the RSView tag picker as shown below. Select PumpSpeed, a tag we already defined or a tag of your choosing in your system, and click OK.

As shown below, the tag PumpSpeed has now been bound to the _AnalogValue1 (same as AnalogValue1) property. So whenever this RSView tag changes values, RSView will automatically write the new value into the Symbol Factory ActiveX control's AnalogValue1 property.

You can now run your RSView application and test your animations. Below we've added an RSView Numeric display and Numeric Input to our Display so that we can type in a new value for pump speed. When the value of PumpSpeed is >= 80 the pump blinks yellow. When it is >= 90 it blinks red. the sequence of screens below shows this.


RSView_LayeringObjects

Handling Adjoining Objects

If you are using the Symbol Factory Standard Control and wish to have several objects meet at their edges - for example a pump next to a pipe, there are a couple of key items that you need to set in order to get the best results.

Background Information

When using ActiveX controls, although the symbol you see on the screen is not a perfect rectangle, the bounding box of the control does have to be a rectangle. ActiveX controls do have a means by which they can allow their background to be transparent. In transparent background mode, the ActiveX control tells the container to repaint the background area whenever the ActiveX control repaints its object. For this to work the container must be able to receive the message from the ActiveX control to repaint the background. Transparency only works well by having the container application (in this case it would be RSView) repaint the background.

Because RSView does not at this time support background transparency with ActiveX controls, all instances of the Symbol Factory default to an opaque background and you cannot change the BackStyle property to transparent. By default the background is set automatically to match your RSView display background.

Application Tips

Thus when you want to have two objects match up exactly at the edge of the actual object, there are some tips that help you achieve the desired effect.

  1. Set the .Stretch property to True - This will allow the object to go all the way to the edge of the bounding rectangle.

  2. Set the .Padding property to 0 or -1 - The Symbol Factory ActiveX images are vector images - which is why you can scale them very large on the screen without loss of display quality. However vector coordinate systems used by windows for drawing images are subject to round off error which can result in a small blank area around a single or multiple edges of the rectangle. When a container supports background transparency, this is a non issue because objects can be layered on top of one another to make their edges meet up as desired. However, when a container does not support background transparency, you can use the .Padding property to adjust how the object appears inside its bounding area and have it meet up with the edge of the box exactly. Note that when using negative values for padding, it can sometimes result in small single pixel clipping of other edges of the image; however, this is usually not noticeable. You can also set the default .Padding property value to a value other than 1 for your entire application by using the INI file setting. If you do this, any individual controls who have their padding property set to a non-default value will remain at their non-default value.

  3. Avoid overlapping objects - when a container does not support background transparency, we have also found that layering (i.e. send to back, bring to front) of ActiveX controls typically has problems also. Thus we suggest you avoid trying to layer on Symbol Factory ActiveX on top of another.

The display below was built in RSView32 with .Padding = -1 on all objects and .Stretch=True.

See Also: Piping Diagrams, Tanks and Cutaways


RSView_Piping

Making Piping Diagrams in RSView

Based on our recommendations for handling adjoining objects, we have found that when creating piping diagrams where you need to join multiple pieces of pipe together, to prevent small gaps between the pieces of pipe, use the following settings.

  • .Stretch property = true on each pipe piece

  • .Padding property = -1 on each pipe piece or piece of equipment that needs to connect to a pipe

  • Do not overlap the edges of the ActiveX controls.

Other application tips:

  • If you will be binding all the pipe pieces to the same RSView tag, setup the first piece of pipe with all the desired animation settings, padding, stretch, and connections to RSView tags. Then use the duplicate option to duplicate the piece of pipe. You can then go back and on each copy change the chosen Symbol and all other animation settings, including your connections, will be preserved for you. This saves you time and duplication of effort.

  • Once you have laid out multiple pieces of pipe, in RSView Studio, you can change the properties of all the pieces of pipe by selecting all the pieces and using the RSView Property Panel. In this fashion you can set the style and animations for all the pipe pieces at one time from the Property Panel.


RSView-Tanks

Handling Tanks and Cutaways in RSView

Because RSView presently does not preserve the z-ordering of ActiveX controls (i.e front to back, or back to front), it is not advisable to put a Symbol Factory Cutaway Control on top of a Symbol Factory Standard Control showing a tank.

However, you can easily accomplish the desired effect by using the Symbol Factory Classic Browser, an optional tool that allows you to export images from the library as metafiles, which can easily be placed on the screen in RSView.

You can then layer the Symbol Factory Cutaway Control on top of the tank. The screen below shows an example where this has been done. Since most users seek to animate the fill color based on the level, not the entire tank body, this approach works well.

Using the Symbol Factory Cutaway control, fills that change color based on the tank level or that fill with bands of different colors at different levels can easily be accomplished through the cutaway control animation settings.


RSView_Deployment

Basic Runtime Deployment with RSView

If you have built applications in RSView that use the Symbol Factory ActiveX control and then wish to distribute them to runtime machines, runtime deployment of Symbol Factory ActiveX involves two steps:

  1. Copy the file SymfacX.ocx to your target runtime computer. You may place it anywhere on your computer that you prefer.

  2. Run regsvr32 on the ActiveX control to register it with the target computer's Windows registry. You do this so that when RSView looks for the Symbol Factory ActiveX by name, the Windows Registry can tell it where the file is. Regsvr32 will already be on your computer - most likely in the Windows\system32 directory. To run regsvr32, open a Dos window, navigate to the directory where you placed SymfacX.ocx and type:

regsvr32.exe symfacx.ocx

If you will be using RSView SE Distributed, different steps are required. Click here for details of RSView SE Distributed deployment.


RSView_SE_Distributed

Runtime Deployment with RSView SE Distributed & RS View Active Display System

If you will be deploying the Symbol Factory ActiveX with an RSView SE Distributed or Active Display application, a different set of steps is required than for a regular deployment.

When using RSView SE Distributed or an RS View Active Display System, RSView can arrange to automatically download any required ActiveX controls from your RSView server and install them on the client PC the first time a page requiring the ActiveX control is loaded. On subsequent loads of the page, the control will not have be installed.

To setup RSView SE Distributed for automatic download of controls requires 2 steps

  1. Creating a CAB file for the SymfacX.ocx and setting up the RSView Server to have the CAB file available. In the RSView Supervisory Edition (SE) Studio Help file, consult the topic "ActiveX Controls - automatic download" in the index and read the article titled "Set up the server for automatic download of ActiveX controls" for information on how to do this.

  2. Setting up the client PC's internet explorer security options to allow the ActiveX to be installed. In the RSView Supervisory Edition (SE) Studio Help file, consult the topic "ActiveX Controls - automatic download" in the index and read the article titled "Set up the client for automatic download of ActiveX controls" for details on the proper settings.

See Also: The PDF document installed with RSView Enteprise titled, "RSView32 Active Display System Getting Results Guide.pdf", Page 67.


 Methods

There are no methods provided that are specific to the Symbol Factory controls.

Your container application may provide some methods as standard ones - refer to your container documentation for information on the standard methods it provides to all ActiveX controls.


 Events

The following standard events are supported by the Symbol Factory ActiveX controls:

Click
DblClick
MouseDown
MouseMove
MouseUp


Property Pages (Standard Control)

Symbols Tab
Style Tab
Animation Tab
Analog Color Fill Mode
Discrete Color Fill Mode

Please see the container specific how-tos or your container documentation for specific instructions on bringing up the property pages for an ActiveX control in your container.

There are two types of property pages for the Symbol Factory ActiveX control. Some containers show both, others just show the custom properties page.

If your container shows the Visual Basic style generic properties page, it looks like this:

The other type of property page is the custom property page. If your container brings it up by default you will know because it appears as shown below. If your container brings up the generic page shown above, you can access the custom page by clicking to the right of the word "(Custom)" on the property page and then clicking on the button that appears after you click.

The Symbol Factory Standard Control has 3 custom property pages. The Symbols Tab is the default page that appears first when you bring up the properties page. You can switch between the properties pages.


Symbols Tab (Standard Control)

This property page is used to select the graphic symbol that you want to have displayed by the Symbol Factory Standard Control. You can browse the categories of symbols using the "Categories" list box. When you click on a category name, thumbnails of the available graphics in that category are shown on the right. If you click on one of the graphics, a larger size image of the graphic is shown for you in preview mode in the upper left.

To select a graphic, click on the graphic, and click the OK button.


Style Tab (Standard Control)

This property page is used to set the standard display style for your chosen graphic. As you change properties on the style tab, the results are previewed for you in the upper left corner of the page. If at any time you want to revert back to the default property settings on this page, click on the "Defaults" button. Before switching to another tab be sure to click on the "Apply" button to store the properties you set on this tab. Clicking on the "OK" button closes the custom property pages.

Click on a property in the picture below for more details:

Orientation Area:

Flip - Use this to selection to flip the graphic vertically or horizontally. Can be set in code using the .Flip property. Default is to 0 - None

Padding - Use this to adjust the thin border that can sometimes exist between the edges of a symbol and the ActiveX bounding rectangle. This property is provided for primary use when BackStyle = 1 - Opaque. When a container does not support background transparency (i.e. you can't set BackStyle = 0 - Transparent), you may run into issues trying to match up edges of objects. By setting the .Stretch property to True and adjusting padding, you can often overcome the limitations of a container that does not support background transparency with ActiveX controls. The units of this property are in pixels.

NOTE: The preview area shown on this property page does NOT exactly match the bounding rectangle on your form. If you are trying to "adjust" or "tweak" the padding, we suggest you position the property page so that you can also see your instance of the control on your form. Then you can make repeated changes to the padding property and click the "Apply" button to see the effect of the change on your form without dismissing the Style Property page. This will speed your adjustments to get things matching the way you desire.

Rotation - Rotates the graphic in orthogonal 90 degree increments. Can be set in code using the .Rotation Property. Default is to 0 - Rotate0

Stretch - Used to set the mode the graphic behaves in when it is resized in the container. When stretch is set off (default), the graphic will maintain its X and Y proportions when being resized. If stretch is turned on, the graphic can be resized in any X and Y proportions, thus allowing you to "stretch" the graphic. Can be set in code using the .Stretch property.

Fill Color:

FillColorMode - Use this selection to set the mode in which the symbol is filled. Can be set in code using the .FillColorMode property.
0 - Original -- symbol is filled as it is in the library by default - to change color one of the following 2 settings must be chosen

1 - Shaded -- symbol is filled with a shaded color with the shading pattern defined by the original shading pattern from the symbol library. When selected allows you to then change the
.FillColor property to a desired color from the Windows pallette of colors.

2 - Solid -- symbol is filled with a solid color (no shading). Select color with the .FillColor setting.

3 - Hollow -- symbol is a line drawing with no filling.

FillColor - This selection is only active when FillColorMode is set to 1- Shaded or 2 - Solid. Click on the color box to bring up the standard windows color pallete selection box. Select your color and click OK on the Color dialog box to apply the color.

Background:

BackStyle - Use this selection to set the background style to transparent (default) or opaque. If Opaque is chosen a background color can be chosen using the BackColor selection.

Note: Some ActiveX containers do not support transparent mode for this property in which case this property will default to Opaque and cannot be changed. This is a limitation of the container application, not of the Symbol Factory ActiveX controls. When the Symbol Factory ActiveX Standard Control detects that a container does not support transparency, it will attempt to match it's background color to that of the container's form underneath when an instance of the control is first placed on a form.

BackColor - Only active when BackStyle set to Opaque. Click on the color box to bring up the standard windows color pallete selection box. Select your color and click OK on the Color dialog box to apply the color.

Blink:

BlinkMode - Use this selection to make the graphic blink in one of 3 modes.

0 - No Blink (Default) -- control does not blink

1 - Blink Invisible -- the control alternates between a state of invisible and the color set by the Fill Color settings

2 - Blink Shaded -- the control alternates between a shaded color state with one color set by the Fill Color settings and the other color set by the BlinkColor property.

4 - Blink Solid -- the control alternates between a solid color state with one color set by the Fill Color settings and the other color set by the BlinkColor property.

BlinkSpeed - Only active when BlinkMode is set to other than 0 - None. Sets the speed in Milliseconds for the blinks - 3 default settings are given:

250 - Fast
500 - Medium
1000 - Slow

BlinkSpeed can be set in code by writing an integer value in the range of 1 to 32767 to the .BlinkSpeed property.

BlinkColor - Only active when BlinkMode is set to 2 - Blink Shaded or 3 - Blink Solid. Defines the color used as the alternate color when blinking. Click on the color box to bring up the standard windows color pallete selection box. Select your color and click OK on the Color dialog box to apply the color.


Animation Tab (Standard Control)

This property page is used to configure graphic animations based on analog or discrete values that you pass to the control. These values may be generated by your application or real values read from a PLC or other control devices.

Before switching to another tab be sure to click on the "Apply" button to store the properties you set on this tab. Clicking on the "OK" button closes the custom property pages.

Animation Mode:

Use this selection to enable animation on the chosen graphic. The chosen graphic is previewed in up to 5 different animation modes on this page when animation is enabled. You can change this property in code by writing to the .AnimationMode property. You have three modes of animation to choose from:

0 - None
1 - Analog Color Fill
2 - Discrete Color Fill

Band Count:

This selection is only enabled with either 1 - Analog Color Fill or 2 - Discrete Color Fill is enabled for the AnimationMode property. You can change this property in code if you desire by writing to the .BandCount property When enabled, this selection lets you select from 1 to 5 bands of color control for the object. Previews and additional settings are only shown for the number of bands you have chosen. For example if you choose 3 bands, only 3 previews, 3 style setting tabs and 2 breakpoints (analog color fill) are shown.

Style:

These selections are used to set the animation fill style for each band in both AnalogColorFill or DiscreteColorFill mode. One Style selector is shown for each band. You can also set these styles programmatically using the BandxStyle properties.

You can choose from 6 different styles for each color band:

0 - Original - uses the symbol's settings as defined by the settings on the Style tab in the property pages

1 - Shaded - uses the shading pattern from the library but the color you select in the color box that appears to the right of the Style selector for this band.

2 - Solid - colors the symbol solid with the color you select in the color box that appears to the right of the Style selector for this band.

3 - Blink Invisible - causes the symbol to blink between the default library color scheme for the symbol and an invisible state.

4 - Blink Shaded - causes the symbol to blink between the default library color scheme for the symbol and a shaded color scheme defined by the color you select in the color box that appears to the right of the Style selector for this band.

5 - Blink Solid - causes the symbol to blink between the default library color scheme for the symbol and a solid color scheme defined by the color you select in the color box that appears to the right of the Style selector for this band.

If Blinking is chosen as a mode, you can control the blink speed by setting the .BlinkSpeed property in code to a valid value or by going to the style tab, temporarily changing the blink mode to an active blink mode, selecting the speed from the 3 presets, and then turning blinking back off (unless of course your default state for the graphic is a blinking mode, in which case leave blinking enabled).


Standard Control Properties

See Also: Symbols Tab | Style Tab | Animation Tab

AnalogValue1
Animation Mode
BackColor
BackStyle
BandXBreakpoint (where X = 1 to 4)
BandXColor (where X = 1 to 4)
BandCount
BandXStyle (where X = 1 to 4)
BlinkColor
BlinkMode
BlinkSpeed
DiscreteValue1
DiscreteValue2
DiscreteValue3
DiscreteValue4
DiscreteValue5
FillColor
FillColorMode
Flip
Padding
Rotation
Stretch


AnalogValue1 Property (Standard Control)

Description: Read/Write property that retrieves/sets the analog value in the control that is used to control the Analog Color Fill animations

Data Type: Double Precision Floating Point

Default Value: 0

Syntax:

To set the property: Object.AnalogValue1 = variable
To read the property: variable = Object.AnalogValue1

Where:

Object = Valid object name of a Symbol Factory Standard Control - by default this control is assigned names in many containers of the type SFStandardx where x is an integer

Variable = a double precision floating point value or variable

Example:

SFStandard1.AnalogValue1 = 43.56

Or

Dim dblTank42Level as Double

dblTank42Level = 43.56

SFStandard1.AnalogValue1 = dblTank42Level

Remarks: See Also AnimationMode


Animation Mode Property

Animation Mode Property (Standard Control)

Description: Read/Write property that sets the animation mode of the control

Data Type: Integer, Enumerated Data Type

Default Value: 0 or AnimationModeNone

Syntax:

To set the property: Object.AnimationMode = variable

To read the property: variable = Object.AnimationMode

Where:

Object = Valid object name of a Symbol Factory Standard Control - by default this control is assigned names in many containers of the type SFStandardx where x is an integer

Variable = an integer in the range of 0 to 2 or one of the following enumerated constants provided by the control:

Enumerated Constant Value Meaning

AnimationModeAnalogFill | 1 | Control will go through appearance changes based on the changing value of an analog value in the AnalogValue1 property. Appearance is controlled by BandxStyle and BandxColor properties. Number of available bands controlled by BandCount. Changes occur when AnalogValue1 passes the BandxBreakpoint values.
AnimationModeDiscreteFill | 2 | Control will go through appearance changes based on the changing boolean values of the DiscreteValue1 through DiscreteValue5 properties. Appearance is controlled by BandxStyle and BandxColor properties. Number of available bands controlled by BandCount.
AnimationModeNone | 0 | No animation mode enabled

Example:

SFStandard1.AnimationMode = AnimationModeAnalogFill

Or

SFStandard1.AnimationMode = 1

See Also the following properties that are used to setup the animation behavior and control it.

AnalogValue1, Band1Breakpoint through Band4Breakpoint, Band1Color through Band5Color, BandCount, Band1Style through Band5Style, DiscreteValue1 through DiscreteValue5


BackColor Property (Standard Control)

Description: Read/Write property that retrieves/sets the background color that appears behind the control when the BackStyle property is set to Opaque mode.

Data Type: OLE Color

Default Value: Grey or &H00C0C0C0&

Syntax:

To set the property: Object.BackColor = variable
To read the property: variable = Object.BackColor

Where:

Object = Valid object name of a Symbol Factory Standard Control - by default this control is assigned names in many containers of the type SFStandardx where x is an integer

Variable = a number or constant representing a valid color. May be set using using VB color constants or the Hex representation of any valid Windows color. See your VB/VBA documentation for more information on color constants.

Example:

SFStandard1.BackColor = vbRed

Or

SFStandard1.BackColor = &HFF

Remarks: Setting this property only has an effect on the appearance of the control when the BackStyle property is set to 1 or Opaque. See also BackStyle


BackStyle Property (Standard Control)

Description: Read/Write property that retrieves/sets the background style that appears behind the control.

Data Type: Enumerated Integer

Default Value: Transparent if container supports it, opaque otherwise

Syntax:

To set the property: Object.BackStyle = variable
To read the property: variable = Object.BackStyle

Where:

Object = Valid object name of a Symbol Factory Standard Control - by default this control is assigned names in many containers of the type SFStandardx where x is an integer

Variable = a number or enumerated constant from the list below

Enumerated Constant | Corresponding Value
Opaque | 1
Transparent | 0

Example:

SFStandard1.BackStyle = Opaque

Or

SFStandard1.BackStyle = 1

Remarks: Some container applications do not support the Transparent Style because they do not support what are called "Windowless" controls. In that case this property defaults to Opaque instead of Transparent and may not be changed. Change the background color when in Opaque mode using the BackColor property.


Band Breakpoint Properties (Standard Control)

Applies To: Band1Breakpoint , Band2Breakpoint, Band3Breakpoint, and Band4Breakpoint

Description: These 4 properties are Read/Write properties that retrieve/set the breakpoint at which the control changes its appearance from one animation band setting to another when the AnimationMode property is set to AnimationModeAnalogFill. BandCount determines which of these breakpoints are active at any given time.

Band1Breakpoint defines the value of AnalogValue1 above which animation will switch from the settings for Band1 to Band2

Band2Breakpoint defines the value of AnalogValue1 above which animation will switch from the settings for Band2 to Band3

Band3Breakpoint defines the value of AnalogValue1 above which animation will switch from the settings for Band3 to Band4

Band4Breakpoint defines the value of AnalogValue1 above which animation will switch from the settings for Band4 to Band5

Data Type: Double Precision Floating Point

Default Value: 0

Syntax:

To set the property: Object.Band1Breakpoint = variable

To read the property: variable = Object.Band1Breakpoint

Where:

Object = Valid object name of a Symbol Factory Standard Control - by default this control is assigned names in many containers of the type SFStandardx where x is an integer

Variable = a number or variable of double precision floating point (double) data type

Example:

SFStandard1.Band1Breakpoint = 10

Or

SFStandard1.Band1Breakpoint = 10.45

Or

Dim dblTank1Band1Breakpoint as Double

dblTank1Band1Breakpoint = 10.45

SFStandard1.Band1Breakpoint = dblTank1Band1Breakpoint

Remarks:

Although all 4 of these breakpoint properties are activex, they are only active when the AnimationMode property is set to 1 or AnimationModeAnalogFill.

The BandCount property setting determines which of these properties will have an effect on the control.

For example, if BandCount is set to 3, then only Band1Breakpoint and Band2Breakpoint are active. The control compares the value of AnalogValue1 against these breakpoints when making its determination of what band of animation to display.


Band Color Properties (Standard Control)

Applies To: Band1Color, Band2Color, Band3Color, Band4Color, Band5Color

Description: Read/Write property that retrieves/sets the color of the animation bands when AnimationMode is set to 1 - AnimationModeAnalogFill or 2 - AnimationModeDiscreteFill.

Each of these properties only have an effect on the control's appearance when in these modes AND the BandCount property is set to at least as many bands as the property you wish to set.

For example, if BandCount = 3, then only Band1Color, Band2Color, and Band3Color will have an effect on the control's behavior and appearance.

Also, the type of color fill - shaded, solid, blinking solid, blinking shaded - is set using the BandxStyle properties where x = the corresponding band number.

Data Type: OLE Color

Default Values:

Band1Color: Red or &H000000FF&

Band2Color: Yellow or &H0000FFFF&

Band3Color: defaults to equal the setting of the FillColor Property.

Band4Color: Yellow or &H0000FFFF&

Band5Color: Red or &H000000FF&

Syntax:

To set the property: Object.BandColor = variable

To read the property: variable = Object.BandColor

Where:

Object = Valid object name of a Symbol Factory Standard Control - by default this control is assigned names in many containers of the type SFStandardx where x is an integer

Variable = a number or constant representing a valid color. May be set using using VB color constants or the Hex representation of any valid Windows color. See your VB/VBA documentation for more information on color constants.

Example:

SFStandard1.Band1Color = vbRed

Or

SFStandard1.Band1Color = &HFF


Band Count

Band Count (Standard Control)

Description: Read/Write property that retrieves/sets the number of bands of analog or discrete animation when the AnimationMode property is set to 1 - AnimationModeAnalogFill or 2 - AnimationModeDiscreteFill. Each band can have it's own settings for style and color. When used in AnimationModeAnalogFill this property also affects which of the BandxBreakpoint properties have an effect on the control. If AnimationMode is set to 0 - None, then changing this property has no immediate effect on the appearance of the control.

Data Type: Integer

Default Value: 5

Syntax:

To set the property: Object.BandCount = variable

To read the property: variable = Object.BandCount

Where:

Object = Valid object name of a Symbol Factory Standard Control - by default this control is assigned names in many containers of the type SFStandardx where x is an integer

Variable = a number or variable representing the number of bands desired for animations.

Example:

SFStandard1.BandCount = 3

Or

Dim intTank4BandCount as Integer

intTank4BandCount = 3

SFStandard1.BandCount = intTank4BandCount

See Also AnimationMode, Band1Breakpoint to Band4Breakpoint


Band Style Properties (Standard Control)

Applies to: Band1Style, Band2Style, Band3Style, Band4Style, Band5Style

Description: These 5 properties are Read/Write properties that retrieve/set the style of the control's appearance in each of the animation bands when the AnimationMode property is set to AnimationModeAnalogFill or AnimationModeDiscreteFill.

Each of these properties only have an effect on the control's appearance when in these modes AND the BandCount property is set to at least as many bands as the property you wish to set.

For example, if BandCount = 3, then only Band1Style, Band2Style, and Band3Style will have an effect on the control's behavior and appearance.

Data Type: Enumerated Integer

Default Values:

Band1Style = 4 - BandStyleBlinkShaded

Band2Style = 1 - BandStyleShaded

Band3Style = 0 - BandStyleOriginal

Band4Style = 1 - BandStyleShaded

Band5Style = 4 - BandStyleBlinkShaded

Syntax:

To set the property: Object.Band1Style = variable

To read the property: variable = Object.Band1Style

Where:

Object = Valid object name of a Symbol Factory Standard Control - by default this control is assigned names in many containers of the type SFStandardx where x is an integer

Variable = a number or enumerated constant from the list below

Enumerated Constant Corresponding Value

BandStyleOriginal | 0
BandStyleShaded | 1
BandStyleSolid | 2
BandStyleBlinkInvisible | 3
BandStyleBlinkShaded | 4
BandStyleBlinkSolid | 5

Example:

SFStandard1.Band1Style = 3

Or

SFStandard1.Band1Style = BandStyleBlinkInvisible

See Also AnimationMode, BandCount


BlinkColor Property (Standard Control)

Description: Read/Write property that retrieves/sets the blinking color that alternates with the FillColor when BlinkMode is set to 1, 2 or 3. If BlinkMode is set to 0 changing this property has no effect on the appearance of the control.

Data Type: OLE Color

Default Value: Red or &H000000FF&

Syntax:

To set the property: Object.BlinkColor = variable
To read the property: variable = Object.BlinkColor

Where:

Object = Valid object name of a Symbol Factory Standard Control - by default this control is assigned names in many containers of the type SFStandardx where x is an integer

Variable = a number or constant representing a valid color. May be set using using VB color constants or the Hex representation of any valid Windows color. See your VB/VBA documentation for more information on color constants.

Example:

SFStandard1.BlinkColor = vbRed

Or

SFStandard1.BlinkColor = &HFF

Remarks: See also BlinkMode, FillColor


BlinkMode Property (Standard Control)

Description: Read/Write property that sets the blinking mode of the control. When the control is in one of the blinking modes, the control will alternate its display between two colors defined by BlinkColor and FillColor at the rate defined by the BlinkSpeed property.

Data Type: Integer, Enumerated Data Type

Default Value: 0 or BlinkInvisible

Syntax:

To set the property: Object.BlinkMode = variable
To read the property: variable = Object.BlinkMode

Where:

Object = Valid object name of a Symbol Factory Standard Control - by default this control is assigned names in many containers of the type SFStandardx where x is an integer

Variable = an integer in the range of 0 to 2 or one of the following enumerated constants provided by the control:

Enumerated Constant | Value | Meaning
NoBlink | 0 | No blinking is enabled - object will display according to the FillColorMode and FillColor property settings
BlinkInvisible | 1 | Control will alternate between the color settings defined by BlinkColor and the background color set by the BackColor property if BackStyle = 1 - Opaque, or the color of the underlying form if BackStyle = 0 - Transparent.
BlinkShaded | 2 | Control will alternate in a shaded fill mode defined by the control's default appearance with the color settings defined by BlinkColor and the color defined by the FillColorMode and FillColor property settings.
BlinkSolid | 3 | Control will alternate in a solid fill mode defined by the control's default appearance with the color settings defined by BlinkColor and the color defined by the FillColorMode and FillColor property settings.

Example:

SFStandard1.BlinkMode = BlinkInvisible

Or

SFStandard1.BlinkMode = 1

Remarks: By design, this property does not appear in the VB generic properties list nor does it appear in the VB Object Browser or in the Intellisense list of available properties when typing in code; however when entered in proper syntax, the VB pre-compile check will accept the property name.

See Also the following properties that are used to setup the animation behavior and control it.

AnalogValue1, BandCount, Band1Breakpoint, Band2Breakpoint, Band3Breakpoint, Band4Breakpoint, BandCount, Band1Style, Band2Style, Band3Style, Band4Style, Band5Style, DiscreteValue1, DiscreteValue2, DiscreteValue3, DiscreteValue4, DiscreteValue5


BlinkSpeed Property (Standard Control)

Description: Read/Write property that retrieves/sets the speed at which the control blinks when the BlinkMode property is set to 1, 2, or 3 (blinking enabled modes).

Data Type: Integer with optional enumerated constant settings

Default Value: 500 - Medium

Syntax:

To set the property: Object.BlinkSpeed = variable
To read the property: variable = Object. BlinkSpeed

Where:

Object = Valid object name of a Symbol Factory Standard Control - by default this control is assigned names in many containers of the type SFStandardx where x is an integer

Variable = a number or variable representing the rate of blinking in milliseconds or one of the following enumerated constants:

Enumerated Constant | Value
Fast | 250
Medium | 500
Slow | 1000

Example:

SFStandard1.BlinkSpeed = Fast

Or

SFStandard1.BlinkSpeed = 300

Or

Dim intTank42BlinkSpeed as Integer

intTank42BlinkSpeed = 300

SFStandard1.BlinkSpeed = intTank42BlinkSpeed

Remarks: See Also BlinkMode


DiscreteValue1 Property (Standard Control)

DiscreteValueX Property (Standard Control) (where x=1 to 5)

Also applies to DiscreteValue2, DiscreteValue3, DiscreteValue4, and DiscreteValue5

Description: These 5 properties are Read/Write properties that retrieve/set the discrete values that are used to control the object's appearance when AnimationMode is set to 2 - AnimationModeDiscreteFill.

Data Type: Boolean
Default Value: False

Syntax:

To set the property: Object.DiscreteValue1 = variable
To read the property: variable = Object. DiscreteValue1

Where:

Object = Valid object name of a Symbol Factory Standard Control - by default this control is assigned names in many containers of the type SFStandardx where x is an integer

Variable = True or False or a variable of Boolean Data type

Example:

SFStandard1.DiscreteValue1 = True

or

Dim blnValve45State as Boolean

blnValve45State = True

SFStandard1.DiscreteValue1 = blnValve45State

Remarks: See also AnimationMode.

The way the band of animation that will be displayed based on the state of these DiscreteValuex properties is chosen by the control is by looking at the state of DiscreteValue1 first and going to down until it encounters a True in one of the DiscreteValue properties. The lowest numbered DiscreteValue property that is on is the band that will be on. For example, if DiscreteValue3, 4 and 5 are on, then Band 3 will be enabled. The following table gives you some examples of the various combinations of the states of the DiscreteValue properties and the resulting enabled band.

DiscreteValue1 | DiscreteValue2 | DiscreteValue3 | DiscreteValue4 | DiscreteValue5 | Band Enabled
True | False | False | False | False | Band 1
False | True | False | False | False | Band 2
False | False | True | False | False | Band 3
False | False | False | True | False | Band 4
False | False | False | False | True | Band 5
True | True | True | True | True | Band 1
False | True | True | True | True | Band 2
True | False | False | False | True | Band 1
False | False | True | True | False | Band 3
False | False | False | False | False | No band active

Note that if all the DiscreteValue properties are False, then the symbol will be displayed in its normal state as defined by the style tab.

The appearance of each band is set using the BandxStyle and BandxColor properties where x = the band number.


FillColor Property (Standard Control)

Description: Read/Write property that retrieves/sets the fill color for the control. The style of fill is controlled by setting the FillColorMode property. This property only has an effect on the control's appearance when FillColorMode is set to something other than 0 - Original or 3 - Hollow. You must set FillColorMode to something other than 0 to have this property cause an appearance change.

Data Type: OLE Color

Default Value: Green or &H00008000&

Syntax:

To set the property: Object.FillColor = variable
To read the property: variable = Object.FillColor

Where:

Object = Valid object name of a Symbol Factory Standard Control - by default this control is assigned names in many containers of the type SFStandardx where x is an integer

Variable = a number or constant representing a valid color. May be set using using VB color constants or the Hex representation of any valid Windows color. See your VB/VBA documentation for more information on color constants.

Example:

SFStandard1.FillColor = vbRed

Or

SFStandard1.FillColor = &HFF

Remarks: See Also FillColorMode


FillColorMode Property (Standard Control)

Description: Read/Write property that retrieves/sets the mode of color fill that will be applied to the control. The color that is used is set using the FillColor property.

Data Type: Enumerated Integer

Default Value: 0 - Original

Syntax:

To set the property: Object.FillColorMode= variable
To read the property: variable = Object. FillColorMode

Where:

Object = Valid object name of a Symbol Factory Standard Control - by default this control is assigned names in many containers of the type SFStandardx where x is an integer

Variable = a number or enumerated constant from the list below

Enumerated Constant | Value | Appearance of Control
Original | 0 | Follows the fill scheme set by default when the graphic is chosen from the Symbols tab on the custom properties page.
Shaded | 1 | Applies a shaded fill scheme using the color specified by FillColor
Solid | 2 | Applies a solid color fill scheme using the color specified by FillColor
Hollow | 3 | Applies a line drawing hollow appearance to the object.

Example:

SFStandard1.FillColorMode = Shaded

Or

SFStandard1.BackStyle = 1

Remarks: See also FillColor.


Flip Property (Standard Control)

Description: Read/Write property that retrieves/sets a constant to whether the image is flipped in a horizontal or vertical mode or both.

Data Type: Enumerated Integer

Default Value: 0 - None

Syntax:

To set the property: Object.Flip= variable
To read the property: variable = Object. Flip

Where:

Object = Valid object name of a Symbol Factory Standard Control - by default this control is assigned names in many containers of the type SFStandardx where x is an integer

Variable = a number or enumerated constant from the list below

Enumerated Constant | Value | Appearance of Control
None | 0 | Control appears in the default perspective as shown when the graphic is chosen from the Symbols tab on the custom properties page.
Horizontal | 1 | Flips the control about a vertical axis drawn through the center of the object.
Vertical | 2 | Flips the control about a horizontal axis drawn through the center of the object.
Both | 3 | Flips the control about a horizontal and a vertical axis drawn through the center of the object.

Example:

SFStandard1.Flip = Horizontal

Or

SFStandard1.Flip = 1


Padding Property (Standard Control)

Description: Read/Write property that determines the number of blank pixels that surround the image in a Symbol Factory Standard Control.

For containers that do not support background transparency on ActiveX controls, this setting is very important for use when matching up adjoining objects. For some objects, this setting will need to be changed to 0 or -1 if your container does not support background transparency. Refer to the "Working With" section of this help file for your specific container for details and suggested settings.

If your container does support background transparency on ActiveX controls, then you will likely never have to change this setting.

Data Type: Integer

Default Value: 1

Syntax:

To set the property: Object.Padding = variable
To read the property: variable = Object. Padding

Where:

Object = Valid object name of a Symbol Factory Standard Control - by default this control is assigned names in many containers of the type SFStandardx where x is an integer

Variable = a number or variable representing the desired padding.

Example:

SFStandard1.Padding=7

Or

SFStandard1.Padding=-1

Or

Dim nPadding as Integer

nPadding=7

SFStandard1.Padding= nPadding


Rotation Property (Standard Control)

Description: Read/Write property that retrieves/sets the rotation of the object. Currently rotation is supported in 90 degree increments only.

Data Type: Enumerated Integer

Default Value: 0 - Rotate 0

Syntax:

To set the property: Object.Rotation= variable
To read the property: variable = Object. Rotation

Where:

Object = Valid object name of a Symbol Factory Standard Control - by default this control is assigned names in many containers of the type SFStandardx where x is an integer

Variable = a number or enumerated constant from the list below

Enumerated Constant | Value | Appearance of Control
Rotation0 | 0 | Control appears in the default perspective as shown when the graphic is chosen from the Symbols tab on the custom properties page.
Rotation90 | 90 | Rotates the object 90 degrees counterclockwise from the default
Rotation180 | 180 | Rotates the object 180 degrees counterclockwise from the default
Rotation270 | 270 | Rotates the object 270 degrees counterclockwise from the default

Example:

SFStandard1.Rotation = Rotation90

Or

SFStandard1.Rotation = 90

Remarks: If values other than an increment of 90 degrees is entered, the control automatically behaves as shown in the following table:

Range of Value Entered | Angle Displayed
0 to 44 | 0
45 to 134 | 90
135 to 224 | 180
225 to 314 | 270
315 to 360 | 0

Values greater than 360 automatically scaled back to a range of 0 to 360 and are handled the same way as if they were in the range of 0 to 360 as shown in this table.


Stretch Property (Standard Control)

Description: Read/Write property that retrieves/sets the how the control appears when it is resized at design or runtime. If set to False (default), the control is resized with the X and Y size proportions maintained with respect to each other automatically regardless of what the user attempts to do in resizing the control. If set to True, the control can be resized an any proportion of X and Y dimensions, thus "stretching" the appearance of the graphic.

Data Type: Boolean

Default Value: False

Syntax:

To set the property: Object.Stretch = variable
To read the property: variable = Object. Stretch

Where:

Object = Valid object name of a Symbol Factory Standard Control - by default this control is assigned names in many containers of the type SFStandardx where x is an integer

Variable = True or False or a variable of Boolean Data type

Example:

SFStandard1.Stretch = True

Or

Dim blnValve45Stretch as Boolean

blnValve45Stretch = True

SFStandard1.Stretch= blnValve45Stretch


Advanced Settings

SymFacX.INI file Settings

Through editing the SymFacX.INI file, you can control some behaviors of the product on a global basis. By global basis we mean for all uses of the ActiveX control on the machine.

Location of SymFacX.INI:

You can find SymFacX.INI in the same directory as the product, which is normally either \Program Files\Symbol Factory ActiveX or \Program Files\Symbol Factory ActiveX 2.0\

Available Settings:

As of the current release, the following settings are available to the user:

Default Padding - Standard Control

In the [Configure] section of the INI file, adding a setting of DefaultPadding will override the Standard Control's normal default of 1 pixel for the .Padding property.

Example:

[Configure]

DefaultPadding=0

Usage Notes:

  • The units on Padding are in pixels

  • If DefaultPadding entry is NOT present in the INI file or is commented out with a semicolon ; character before the entry, then the control's internal, hard coded, normal default value of 1 pixel will be used. This preserves backward compatibility for users of previous versions as the control ships with this DefaultPadding setting disabled in the INI file.

  • If present, this setting will determine the default value of the .Padding property. If you have changed the value of the Padding property on an instance of the control using the property pages, your value will be used. The default value set in the INI file is ONLY used to initialize the control instance properties in two situations:

    • When the instance is initially created on the form

    • If you click the Defaults button the Style Tab to reset the properties for that instance of the control to the default values.


Property Pages (Cutaway Control)

Style Tab
Animation Tab
Analog Color Fill Mode
Discrete Color Fill Mode

Please see the container specific how-tos or your container documentation for specific instructions on bringing up the property pages for an ActiveX control in your container.


Style Tab (Cutaway Control)

This property page is used to set the display style for your cutaway control. As you change properties on the style tab, the results are previewed for you in the upper left corner of the page. If at any time you want to revert back to the default property settings on this page, click on the "Defaults" button. Before switching to another tab be sure to click on the "Apply" button to store the properties you set on this tab. Clicking on the "OK" button closes the custom property pages altogether.

Levels:

LevelMax - This is the value that makes the cutaway appear full. Can be set in code using the .LevelMax property. Default is 100.

Level - This is the value that is used to control the level in the cutaway control. Can be set in code using the .Level property. Default is 50.

LevelMin - This is the value that makes the cutaway appear empty. Can be set in code using the .LevelMin property. Default is 0.

Colors:

EmptyColor - Use this to set the color of the part of the cutaway control that is empty. Click on the color box to bring up the standard windows color palette selection box. Select your color and click OK on the Color dialog box to apply the color.

FillColor - Use this to set the color of the part of the cutaway control that is full. This might also be called the “water” color. Click on the color box to bring up the standard windows color palette selection box. Select your color and click OK on the Color dialog box to apply the color.

Misc:

BorderType - Use this selection to change the appearance of the border.
0 - None -- no border
  1. - Fixed Single -- a single line border
  2. - Inset (Default) -- a 3-D inset border
WaterSurface - If true (default), the water is drawn with a shaded surface.
Blink:
BlinkMode - Use this selection to make the cutaway control blink.
0 - No Blink (Default) -- control does not blink
  1. - Blink -- the control blinks between its normal colors and the selected BlinkColor
BlinkSpeed - Only active when BlinkMode is set to 1 - Blink. Sets the speed in Milliseconds for the blinks - 3 default settings are given:
250 - Fast
500 - Medium
1000 - Slow
BlinkSpeed can be set in code by writing an integer value in the range of 1 to 32767 to the .BlinkSpeed property.
BlinkColor - Only active when BlinkMode is set to 1 - Blink. Defines the color used as the alternate color when blinking. Click on the color box to bring up the standard windows color pallete selection box. Select your color and click OK on the Color dialog box to apply the color.


Animation Tab (Cutaway Control)

This property page is used to configure graphic animations based on analog or discrete values that you pass to the control. These values may be generated by your application or real values read from a PLC or other control devices.

Before switching to another tab be sure to click on the "Apply" button to store the properties you set on this tab. Clicking on the "OK" button closes the custom property pages.

Animation Mode:

Use this selection to enable animation on the cutaway control. The cutaway is previewed in up to 5 different animation modes on this page when animation is enabled. You can change this property in code by writing to the .AnimationMode property. You have three modes of animation to choose from:

0 - None

1 - Analog Color Fill

2 - Discrete Color Fill

Band Count:

This selection is only enabled with either 1 - Analog Color Fill or 2 - Discrete Color Fill is enabled for the AnimationMode property. You can change this property in code if you desire by writing to the .BandCount property When enabled, this selection lets you select from 1 to 5 bands of color control for the object. Previews and additional settings are only shown for the number of bands you have chosen. For example if you choose 3 bands, only 3 previews, 3 style setting tabs and 2 breakpoints (analog color fill) are shown.

Multicolor Fill:

This setting determines how multiple color bands are handled when the AnimationMode property is set to 1 or 2. When this property is set to true, the cutaway fill will appear in multiple colors as defined by the band settings bandcount, bandstyle, bandbreakpoint, and bandcolor and the appropriate level property or DiscreteValue property values. For example, if the animation indicates that more than one band should be active and MulticolorFill is true, then the cutaway will be filled with the appropriate color in the range of each band. If false, then the whole cutaway will change appearance as the animation dictates as the Level or DiscreteValue properties force a change from one band to another.

Style:

These selections are used to set the animation fill style for each band in both AnalogColorFill or DiscreteColorFill mode. One Style selector is shown for each band. You can choose from 3 different styles for each color band:

0 - OriginalColor - uses the cutaway's original colors as defined by the settings on the Style tab in the property pages

1 - ChangeColor - uses the color you select in the color box that appears to the right of the Style selector for this band.

2 - Blink - causes the control to blink.

If Blinking is chosen as a mode, you can control the blink speed by setting the .BlinkSpeed property in code to a valid value or by going to the style tab, temporarily changing the blink mode to an active blink mode, selecting the speed from the 3 presets, and then turning blinking back off (unless of course your default state for the graphic is a blinking mode, in which case leave blinking enabled).


Cutaway Control Properties

See Also: Style Tab | Animation Tab

Animation Mode
BandBreakPointx
BandColor x
BandCount
BandStyle x
BlinkColor
BlinkMode
BlinkSpeed
BorderType
DiscreteValue1
DiscreteValue2
DiscreteValue3
DiscreteValue4
DiscreteValue5
EmptyColor
FillColor
Level
LevelMin
LevelMax
MulticolorFill
WaterSurface


Animation Mode Property (Cutaway Control)

Description: Read/Write property that sets the animation mode of the control

Data Type: Integer, Enumerated Data Type

Default Value: 0 or AnimationModeNone

Syntax:

To set the property: Object.AnimationMode = variable

To read the property: variable = Object.AnimationMode

Where:

Object = Valid object name of a Symbol Factory Cutaway Control - by default this control is assigned names in many containers of the type SFCutawayx where x is an integer

Variable = an integer in the range of 0 to 2 or one of the following enumerated constants provided by the control:

Enumerated Constant Value Meaning

AnimationModeAnalogFill | 1 | Control will go through appearance changes based on the changing value of an analog value in the AnalogValue1 property. Appearance is controlled by BandxStyle and BandxColor properties. Number of available bands controlled by BandCount. Changes occur when AnalogValue1 passes the BandxBreakpoint values.
AnimationModeDiscreteFill | 2 | Control will go through appearance changes based on the changing boolean values of the DiscreteValue1 through DiscreteValue5 properties. Appearance is controlled by BandxStyle and BandxColor properties. Number of available bands controlled by BandCount.
AnimationModeNone | 0 | No animation mode enabled

Example:

SFCutaway1.AnimationMode = AnimationModeAnalogFill

Or

SFCutaway1.AnimationMode = 1

See Also the following properties that are used to setup the animation behavior and control it.

Band1Breakpoint through Band4Breakpoint, Band1Color through Band5Color, BandCount, Band1Style through Band5Style, DiscreteValue1 through DiscreteValue5, Level


Band Breakpoint Properties (Cutaway Control)

Applies To: Band1Breakpoint , Band2Breakpoint, Band3Breakpoint, and Band4Breakpoint

Description: These 4 properties are Read/Write properties that retrieve/set the breakpoint at which the control changes its appearance from one animation band setting to another when the AnimationMode property is set to AnimationModeAnalogFill. BandCount determines which of these breakpoints are active at any given time.

Band1Breakpoint defines the value of AnalogValue1 above which animation will switch from the settings for Band1 to Band2

Band2Breakpoint defines the value of AnalogValue1 above which animation will switch from the settings for Band2 to Band3

Band3Breakpoint defines the value of AnalogValue1 above which animation will switch from the settings for Band3 to Band4

Band4Breakpoint defines the value of AnalogValue1 above which animation will switch from the settings for Band4 to Band5

Data Type: Double Precision Floating Point

Default Value: 0

Syntax:

To set the property: Object.Band1Breakpoint = variable

To read the property: variable = Object.Band1Breakpoint

Where:

Object = Valid object name of a Symbol Factory Cutaway Control - by default this control is assigned names in many containers of the type SFCutawayx where x is an integer

Variable = a number or variable of double precision floating point (double) data type

Example:

SFCutaway1.Band1Breakpoint = 10

Or

SFCutaway1.Band1Breakpoint = 10.45

Or

Dim dblTank1Band1Breakpoint as Double

dblTank1Band1Breakpoint = 10.45

SFCutaway1.Band1Breakpoint = dblTank1Band1Breakpoint

Remarks:

Although all 4 of these breakpoint properties are activex, they are only active when the AnimationMode property is set to 1 or AnimationModeAnalogFill.

The BandCount property setting determines which of these properties will have an effect on the control.

For example, if BandCount is set to 3, then only Band1Breakpoint and Band2Breakpoint are active. The control compares the value of AnalogValue1 against these breakpoints when making its determination of what band of animation to display.


Band Color Properties (Cutaway Control)

Applies To: Band1Color, Band2Color, Band3Color, Band4Color, Band5Color

Description: Read/Write property that retrieves/sets the color of the animation bands when AnimationMode is set to 1 - AnimationModeAnalogFill or 2 - AnimationModeDiscreteFill.

Each of these properties only have an effect on the control's appearance when in these modes AND the BandCount property is set to at least as many bands as the property you wish to set.

For example, if BandCount = 3, then only Band1Color, Band2Color, and Band3Color will have an effect on the control's behavior and appearance.

Also, the type of color fill - shaded, solid, blinking solid, blinking shaded - is set using the BandxStyle properties where x = the corresponding band number.

Data Type: OLE Color

Default Values:

Band1Color: Red or &H000000FF&

Band2Color: Yellow or &H0000FFFF&

Band3Color: defaults to equal the setting of the FillColor Property.

Band4Color: Yellow or &H0000FFFF&

Band5Color: Red or &H000000FF&

Syntax:

To set the property: Object.BandColor = variable

To read the property: variable = Object.BandColor

Where:

Object = Valid object name of a Symbol Factory Cutaway Control - by default this control is assigned names in many containers of the type SFCutawayx where x is an integer

Variable = a number or constant representing a valid color. May be set using using VB color constants or the Hex representation of any valid Windows color. See your VB/VBA documentation for more information on color constants.

Example:

SFCutaway1.Band1Color = vbRed

Or

SFCutaway1.Band1Color = &HFF


Band Count (Cutaway Control)

Description: Read/Write property that retrieves/sets the number of bands of analog or discrete animation when the AnimationMode property is set to 1 - AnimationModeAnalogFill or 2 - AnimationModeDiscreteFill. Each band can have it's own settings for style and color. When used in AnimationModeAnalogFill this property also affects which of the BandxBreakpoint properties have an effect on the control. If AnimationMode is set to 0 - None, then changing this property has no immediate effect on the appearance of the control.

Data Type: Integer

Default Value: 5

Syntax:

To set the property: Object.BandCount = variable

To read the property: variable = Object.BandCount

Where:

Object = Valid object name of a Symbol Factory Cutaway Control - by default this control is assigned names in many containers of the type SFCutawayx where x is an integer

Variable = a number or variable representing the number of bands desired for animations.

Example:

SFCutaway1.BandCount = 3

Or

Dim intTank4BandCount as Integer

intTank4BandCount = 3

SFCutaway1.BandCount = intTank4BandCount

See Also AnimationMode, Band1Breakpoint to Band4Breakpoint


Band Style Properties (Cutaway Control)

Applies to: Band1Style, Band2Style, Band3Style, Band4Style, Band5Style

Description: These 5 properties are Read/Write properties that retrieve/set the style of the control's appearance in each of the animation bands when the AnimationMode property is set to AnimationModeAnalogFill or AnimationModeDiscreteFill.

Each of these properties only have an effect on the control's appearance when in these modes AND the BandCount property is set to at least as many bands as the property you wish to set.

For example, if BandCount = 3, then only Band1Style, Band2Style, and Band3Style will have an effect on the control's behavior and appearance.

Data Type: Enumerated Integer

Default Values:

Band1Style = 4 - BandStyleBlinkShaded

Band2Style = 1 - BandStyleShaded

Band3Style = 0 - BandStyleOriginal

Band4Style = 1 - BandStyleShaded

Band5Style = 4 - BandStyleBlinkShaded

Syntax:

To set the property: Object.Band1Style = variable

To read the property: variable = Object.Band1Style

Where:

Object = Valid object name of a Symbol Factory Cutaway Control - by default this control is assigned names in many containers of the type SFCutawayx where x is an integer

Variable = a number or enumerated constant from the list below

Enumerated Constant Corresponding Value

BandStyleOriginal | 0
BandStyleShaded | 1
BandStyleSolid | 2
BandStyleBlinkInvisible | 3
BandStyleBlinkShaded | 4
BandStyleBlinkSolid | 5

Example:

SFCutaway1.Band1Style = 3

Or

SFCutaway1.Band1Style = BandStyleBlinkInvisible

See Also AnimationMode, BandCount


BlinkColor Property (Cutaway Control)

Description: Read/Write property that retrieves/sets the blinking color that alternates with the FillColor when BlinkMode is set to 1, 2 or 3. If BlinkMode is set to 0 changing this property has no effect on the appearance of the control.

Data Type: OLE Color

Default Value: Red or &H000000FF&

Syntax:

To set the property: Object.BlinkColor = variable
To read the property: variable = Object.BlinkColor

Where:

Object = Valid object name of a Symbol Factory Cutaway Control - by default this control is assigned names in many containers of the type SFCutawayx where x is an integer

Variable = a number or constant representing a valid color. May be set using using VB color constants or the Hex representation of any valid Windows color. See your VB/VBA documentation for more information on color constants.

Example:

SFCutaway1.BlinkColor = vbRed

Or

SFCutaway1.BlinkColor = &HFF

Remarks: See also BlinkMode, FillColor


BlinkMode Property (Cutaway Control)

Description: Read/Write property that sets the blinking mode of the control. When the control is in one of the blinking modes, the control will alternate its display between two colors defined by BlinkColor and Empty/FillColor at the rate defined by the BlinkSpeed property.

Data Type: Integer, Enumerated Data Type

Default Value: 0 or CutawayNoBlink

Syntax:

To set the property: Object.BlinkMode = variable
To read the property: variable = Object.BlinkMode

Where:

Object = Valid object name of a Symbol Factory Cutaway Control - by default this control is assigned names in many containers of the type SFCutawayx where x is an integer

Variable = an integer in the range of 0 to 1 or one of the following enumerated constants provided by the control:

Enumerated Constant | Value | Meaning
CutawayNoBlink | 0 | No blinking is enabled - object will display according to the Empty Color and FillColor property settings
CutawayBlink | 1 | Control will alternate between the color settings defined by BlinkColor and Empty Color and FillColor property settings.

Example:

SFCutaway1.BlinkMode = CutawayBlink

Or

SFCutaway1.BlinkMode = 1

Remarks: By design, this property does not appear in the VB generic properties list nor does it appear in the VB Object Browser or in the Intellisense list of available properties when typing in code; however when entered in proper syntax, the VB pre-compile check will accept the property name.

See Also the following properties that are used to setup the animation behavior and control it.

Level, BandCount, Band1Breakpoint, Band2Breakpoint, Band3Breakpoint, Band4Breakpoint, BandCount, Band1Style, Band2Style, Band3Style, Band4Style, Band5Style, DiscreteValue1, DiscreteValue2, DiscreteValue3, DiscreteValue4, DiscreteValue5


BlinkSpeed Property (Cutaway Control)

Description: Read/Write property that retrieves/sets the speed at which the control blinks when the BlinkMode property is set to 1 (blinking enabled mode).

Data Type: Integer with optional enumerated constant settings

Default Value: 500 - Medium

Syntax:

To set the property: Object.BlinkSpeed = variable
To read the property: variable = Object. BlinkSpeed

Where:

Object = Valid object name of a Symbol Factory Cutaway Control - by default this control is assigned names in many containers of the type SFCutawayx where x is an integer

Variable = a number or variable representing the rate of blinking in milliseconds or one of the following enumerated constants:

Enumerated Constant | Value
Fast | 250
Medium | 500
Slow | 1000

Example:

SFCutaway1.BlinkSpeed = Fast

Or

SFCutaway1.BlinkSpeed = 300

Or

Dim intTank42BlinkSpeed as Integer

intTank42BlinkSpeed = 300

SFCutaway1.BlinkSpeed = intTank42BlinkSpeed

Remarks: See Also BlinkMode


BorderType Property (Cutaway Control)

Description: Read/Write property that retrieves/sets the type of border that is displayed around the cutaway control.

Data Type: Integer with optional enumerated constant settings

Default Value: 2 - Inset

Syntax:

To set the property: Object.BorderType= variable
To read the property: variable = Object. BorderType

Where:

Object = Valid object name of a Symbol Factory Cutaway Control - by default this control is assigned names in many containers of the type SFCutawayx where x is an integer

Variable = a number or variable representing the type of border to display around the cutaway control.

Enumerated Constant | Value
BorderTypeNone | 0
BorderTypeFixedSingle
BorderTypeInset

Example:

SFCutaway1.BorderType = 0

Or

SFCutaway1.BorderType = BorderTypeNone


DiscreteValue1 Property (Cutaway Control)

Also applies to DiscreteValue2, DiscreteValue3, DiscreteValue4, and DiscreteValue5

Description: These 5 properties are Read/Write properties that retrieve/set the discrete values that are used to control the object's appearance when AnimationMode is set to 2 - AnimationModeDiscreteFill.

Data Type: Boolean

Default Value: False

Syntax:

To set the property: Object.DiscreteValue1 = variable
To read the property: variable = Object. DiscreteValue1

Where:

Object = Valid object name of a Symbol Factory Cutaway Control - by default this control is assigned names in many containers of the type SFCutawayx where x is an integer

Variable = True or False or a variable of Boolean Data type

Example:

SFCutaway1.DiscreteValue1 = True

or

Dim blnValve45State as Boolean

blnValve45State = True

SFCutaway1.DiscreteValue1 = blnValve45State

Remarks: See also AnimationMode, MultiColorFill

The way the band of animation that will be displayed based on the state of these DiscreteValuex properties is chosen by the control is by looking at the state of DiscreteValue1 first and going to down until it encounters a True in one of the DiscreteValue properties.

The lowest numbered DiscreteValue property that is on is the band that will be on. For example, if DiscreteValue3, 4 and 5 are on, then Band 3 will be enabled. The following table gives you some examples of the various combinations of the states of the DiscreteValue properties and the resulting enabled band.

DiscreteValue1 | DiscreteValue2 | DiscreteValue3 | DiscreteValue4 | DiscreteValue5 | Band Enabled
True | False | False | False | False | Band 1
False | True | False | False | False | Band 2
False | False | True | False | False | Band 3
False | False | False | True | False | Band 4
False | False | False | False | True | Band 5
True | True | True | True | True | Band 1
False | True | True | True | True | Band 2
True | False | False | False | True | Band 1
False | False | True | True | False | Band 3
False | False | False | False | False | No band active

Note: If all the DiscreteValue properties are False, then the symbol will be displayed in its normal state as defined by the style tab.

The appearance of each band is set using the BandxStyle and BandxColor properties where x = the band number.


EmptyColor Property (Cutaway Control)

Description: Read/Write property that retrieves/sets the background color that appears behind the filled area of the control in the unfilled area.

Data Type: OLE Color

Default Value: Dark Grey or &H00323232&

Syntax:

To set the property: Object.EmptyColor = variable
To read the property: variable = Object.EmptyColor

Where:

Object = Valid object name of a Symbol Factory Cutaway Control - by default this control is assigned names in many containers of the type SFCutawayx where x is an integer

Variable = a number or constant representing a valid color. May be set using using VB color constants or the Hex representation of any valid Windows color. See your VB/VBA documentation for more information on color constants.

Example:

SFCutaway1.EmptyColor = vbRed

Or

SFCutaway1.EmptyColor = &HFF

Remarks: see also FillColor


FillColor Property (Cutaway Control)

Description: Read/Write property that retrieves/sets the fill color for the control.

Data Type: OLE Color

Default Value: Blue or &H00FF0000&

Syntax:

To set the property: Object.FillColor = variable
To read the property: variable = Object.FillColor

Where:

Object = Valid object name of a Symbol Factory Cutaway Control - by default this control is assigned names in many containers of the type SFCutawayx where x is an integer

Variable = a number or constant representing a valid color. May be set using using VB color constants or the Hex representation of any valid Windows color. See your VB/VBA documentation for more information on color constants.

Example:

SFCutaway1.FillColor = vbRed

Or

SFCutaway1.FillColor = &HFF

Remarks: See Also EmptyColor


Level Property (Cutaway Control)

Description: Read/Write property that retrieves/sets the analog value in the control that is used to control the Analog Color Fill animations

Data Type: Double Precision Floating Point

Default Value: 50

Syntax:

To set the property: Object.Level = variable
To read the property: variable = Object.Level

Where:

Object = Valid object name of a Symbol Factory Cutaway Control - by default this control is assigned names in many containers of the type SFCutawayx where x is an integer

Variable = a double precision floating point value or variable

Example:

SFCutaway1.Level = 43.56

Or

Dim dblTank42Level as Double

dblTank42Level = 43.56

SFCutaway1.Level = dblTank42Level

Remarks: See Also Animation Mode, LevelMax, LevelMin


LevelMax Property (Cutaway Control)

Description: Read/Write property that retrieves/sets the analog value in the control that is the maximum value the level property can obtain. Values entered above LevelMax result in no change in the appearance of the control.

Data Type: Double Precision Floating Point

Default Value: 100

Syntax:

To set the property: Object.LevelMax = variable
To read the property: variable = Object.LevelMax

Where:

Object = Valid object name of a Symbol Factory Cutaway Control - by default this control is assigned names in many containers of the type SFCutawayx where x is an integer

Variable = a double precision floating point value or variable

Example:

SFCutaway1.LevelMax = 43.56

Or

Dim dblTank42LevelMax as Double

dblTank42LevelMax = 43.56

SFCutaway1.LevelMax = dblTank42LevelMax

Remarks: See Also Level, LevelMin


LevelMin Property (Cutaway Control)

Description: Read/Write property that retrieves/sets the analog value in the control that is the minimum value the level property can obtain. Values entered below LevelMin result in no change in the appearance of the control.

Data Type: Double Precision Floating Point

Default Value: 0

Syntax:

To set the property: Object.LevelMin = variable
To read the property: variable = Object.LevelMin

Where:

Object = Valid object name of a Symbol Factory Cutaway Control - by default this control is assigned names in many containers of the type SFCutawayx where x is an integer

Variable = a double precision floating point value or variable

Example:

SFCutaway1.LevelMin = 43.56

Or

Dim dblTank42LevelMin as Double

dblTank42LevelMin = 43.56

SFCutaway1.LevelMin = dblTank42LevelMin

Remarks: See Also Level, LevelMax


MulticolorFill Property (Cutaway Control)

Description: Read/Write property that retrieves/sets how multiple color bands are handled when the AnimationMode property is set to 1 or 2.

When this property is set to true, the cutaway fill will appear in multiple colors as defined by the band settings bandcount, bandstyle, bandbreakpoint, and bandcolor and the appropriate level property or DiscreteValue property values.

For example, if the animation indicates that more than one band should be active and MulticolorFill is true, then the cutaway will be filled with the appropriate color in the range of each band. If false, then the whole cutaway will change appearance as the animation dictates as the Level or DiscreteValue properties force a change from one band to another.

Data Type: Boolean

Default Value: False

Syntax:

To set the property: Object.MulticolorFill = variable
To read the property: variable = Object. MulticolorFill

Where:

Object = Valid object name of a Symbol Factory Cutaway Control - by default this control is assigned names in many containers of the type SFCutawayx where x is an integer

Variable = True or False or a variable of Boolean Data type

Example:

SFCutaway1.MulticolorFill = True


WaterSurface Property (Cutaway Control)

Description: Read/Write property that retrieves/sets how the edge between the filled and unfilled area will appear on the cutaway control. This transition area will be smooth if this property is set to false. If set to true, the transition area will appear "fuzzy" or "rough" like the surface of water.

Data Type: Boolean

Default Value: True

Syntax:

To set the property: Object.WaterSurface = variable
To read the property: variable = Object. WaterSurface

Where:

Object = Valid object name of a Symbol Factory Cutaway Control - by default this control is assigned names in many containers of the type SFCutawayx where x is an integer

Variable = True or False or a variable of Boolean Data type

Example:

SFCutaway1.WaterSurface = False


Distributing the Control

Distributing the Symbol Factory ActiveX Control

Under the terms of the licensing agreement for this product, you are granted certain rights to distribute the Symbol Factory ActiveX control with your application.

Before you make your plans for distributing the Symbol Factory ActiveX control, please review the licensing agreement and contact us if you have any questions about your intended usage. If your usage is a permitted usage under this standard agreement and a written clarification is needed for your case, we can arrange for one. If your usage is one that requires an special software developer OEM license, we have many affordable options. Please contact us before assuming that there isn't a way to meet your needs.

The Symbol Factory ActiveX control is an MFC based ActiveX control authored in Visual C++ 6.0, and as such does have certain dependencies. If you will be distributing a VB or VB.NET application and have built an installation set for your application, you will likely have all the necessary dependencies.

1. Product Files: The license agreement grants you rights to distribute the following files that we provide with your compliant compiled runtime application:

SymFacX.ocx - this file must have regsvr32 run on it as follows after installation:

regsvr32.exe Symfacx.ocx

If you are not running this command from the directory where you plan to install the OCX, then you need to specify the full path to the location of SymfacX.ocx on your hard drive.

Note - if you are using a popular tool such as InstallShield or the VB Deployment Wizard, you should be able to make a check box setting that tells the installer that this file is "self-registering", and the install program will handle calling regsvr32 for you.

SymFacX.ini - you ONLY need to distribute this file IF you have taken advantage of the capabilities of the INI file setting to globally control the default for the Padding Property.

The two files above are the ONLY PRODUCT FILES you are authorized to distribute with your runtime application and are the only ones you need. The specific symbols that you have chosen for use in your application are automatically stored and compiled into your application by your container, whether it is an HMI application or a custom VB program.

2. Dependencies: Like most other ActiveX controls, this ActiveX control does have dependencies which may or may not already be installed on your target machine, which if not present could affect the control's ability to properly operate. These files are NOT files that we created, but are Microsoft files.

MFC42.dll

MSVCRT.dll

COMCTL32.dll


Frequently Asked Questions

Q: When i place an object into my container, the background on the ActiveX is opaque and I cannot set the .BackStyle property to 0. Why is this ?

A: Some ActiveX containers do not support background transparency. In order for an ActiveX to have a transparent background, it must depend on the container to paint the area in the background. Although we could "read" the background and paint it ourselves, this nearly always results in unsightly screen flicker. For that reason, if we detect that a container cannot paint the background behind our ActiveX for us, we default to an Opaque background and attempt to match our background color to that of the container to minimize the impact of this. See also .Padding property, Style Tab Property Page, and design considerations.

Q: My container doesn't support transparency, and I am trying to match up pumps and pipe pieces at their edges, but I am finding there is a small border around the edge of some objects. How can I get rid of the border ?

A: The .Padding property, combined with the .Stretch property can be used to eliminate the padding around the edges. See the Style Tab Property page for how to change these settings.

Q: I moved my application from one computer to the next and the objects are no longer sized right.

A: This means that you have different settings for the Font Size DPI between the machines. See Important Design Tips.

Q: I moved my application from one computer to the next and the background of the Symbol Factory Standard Controls no longer matches the underlying form.

A: This means that you have different settings for the desktop theme between the machines. See Important Design Tips.

Q: Can I use the Symbol Factory ActiveX in Internet Explorer ? Do you have *.cab files for this product ?

A: Symbol Factory ActiveX is not supported for use in Internet Explorer.

Q: Can i change the symbol that is shown in an instance of the Symbol Factory ActiveX at runtime from my code ?

A: No you cannot do this in the standard build of this product. If you have a need for this feature, which essentially would let you give you users development capabilities for the control, and have a business need for this functionality, please contact us to discuss your requirements.


Customer Support

For customer support please contact the distributor from whom you purchased this product. Alternatively, you may contact:

Software Toolbox Inc.

148A East Charles Street

Matthews, NC 28105, USA

Web: www.softwaretoolbox.com

Support Website: support.softwaretoolbox.com

Phone: (704) 849-2773

Fax: (704) 849-6388

Office Hours: Normal office hours are Monday to Friday, 8 AM to 5 PM EST (GMT-5)


License Agreement

Your usage of the Symbol Factory ActiveX control is bound by the terms of the following LICENSE AGREEMENT that was presented to you during the installation process for the product for your acceptance and is on the disk envelope if you also received physical media for the software. If you are unsure if your planned usage is within the terms of this agreement, you should contact Software Toolbox Inc. and seek written clarification.

By opening this package or clicking the OK button, you indicate that you have read this agreement and accept its terms and conditions. This is a legal agreement between you (the end user) and Software Toolbox (Matthews, NC). If you do not agree to the terms of this Agreement, promptly return the disk package and accompanying items (including written materials) to the place where you obtained them for a full refund.

1. GRANT OF LICENSE. The software programs and other materials in this package are provided to you under the terms of this license agreement and are not sold to you. You own the media on which the software is recorded, but Software Toolbox retains copyright, title, and ownership of

the software itself.

2. EVALUATION SOFTWARE. If the enclosed software is marked as "Demo" or "Evaluation", then this software and the images therein shall be used for evaluation purposes only and shall be subject to all other restrictions in this agreement. Under the terms of this agreement, software used for evaluation purposes shall NOT have the right to distribute the ActiveX control at runtime that are granted under the "RUNTIME CONTROLS" section of this agreement.

3. COPY RESTRICTIONS. The development license file may be installed on a maximum of one computer at any given time. You may, however, make one (1) backup copy for archival purposes.

4. RUNTIME CONTROLS. The runtime controls (symfacx.ocx only) may be installed on anynumber of computers with your compiled custom application subject to the restrictions in this agreement. You may NOT distribute any of the category (*.CAT) files with your application - they are not needed for distribution of Symfacx.ocx.

5. OTHER RESTRICTED USES. You may not wrap the Symbol Factory ActiveX binary (symfacx.ocx) in your own binary control and resell it or otherwise wrap it to avoid the single machine development license restrictions. OEM licensing is available for companies wishing to bundle Symbol Factory ActiveX with every copy of their development application (i.e. HMIs supporting ActiveX controls and having a development and runtime mode). You may not extract images from the category files or the Symbol Factory ActiveX control at runtime for the purposes of repackaging them or otherwise displaying them for your applications end user in a way such that they would be able to use the images to develop application screens freely in your application \ or any other application without a proper OEM license for this product. Applications that allow the user to freely choose from all or any subset of the symbols found in this product, place or lay them out on a computer screen in a form of the users choosing, and save said changes for subsequent reuse shall be deemed to be using the product in "Development Mode" and shall require a special OEM license for said usage.

6. NO OTHER RIGHTS. Except as stated above, this agreement does not grant you any rights to patents, copyrights, trade secrets, trade names, trademarks, or any rights, franchises of license with respect to the enclosed software and documentation. You may not modify, translate, disassemble, reverse engineer, or decompile the software, in whole or in part. Software Toolbox reserves all rights not explicitly granted in this license agreement.

7. UPDATE POLICY. Software Toolbox may create, from time to time, updated versions of the software. However, Software Toolbox is under no obligation to provide updates free of charge.

8. WARRANTY. Software Toolbox warrants you that the diskette(s) in this package will be free from defects in materials and workmanship for 90 days from the date of delivery to you.

9. LIMITATION OF WARRANTIES AND LIABILITY. EXCEPT FOR THE EXPRESS WARRANTY ABOVE, SOFTWARE TOOLBOX MAKES NO OTHER WARRANTIES WITH RESPECT TO THIS SOFTWARE, AND IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS, EXPRESS OR IMPLIED. THE MAXIMUM LIABILITY ASSUMED BY SOFTWARE TOOLBOX IS THE PURCHASE PRICE OF THIS SOFTWARE. IN NO EVENT SHALL SOFTWARE TOOLBOX BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SOFTWARE TOOLBOX HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.


Release Notes

Version 2.0 Build 139

  • Added support for Visual Basic .NET including additional sample program bundled with the product

  • Added 800+ additional Symbols

  • Made Padding property visible on Standard Control properties page - useful for users of containers that do not support transparency with windowless ActiveX controls

  • Added ability to globally control the default setting of the .Padding property in the Standard Control via an INI File setting

  • Added additional tips on the Animation tabs of both controls to assist user in how to properly setup the Animations