NISE Configuration API - Excel VBA Examples
Downloads
Filename: 200017.zip
Requirements: View
In order for the examples to work, the subroutines in each must be ran in a specific order. The reason for this is each spreadsheet exposes a specific functionality, such as creating a NISE Virtual Device, configuring channels, and configuring routes. To configure channels, the NISE Virtual Device must be created first. To configure routes, at least in the ways the example shows, the channels must have been configured first.
That being said, to successfully use the attached examples, open them in the order outlined below, and press the button on the sheet that opens.
Also, if at any time you would like to see the VBA code, open the Visual Basic Editor through the Tools » Macro » Visual Basic Editor, or press ALT+F11.
Order to run examples:
1. Create_Name_Add_IVI_Devices.xls
2. Configure_Channels.xls
3. Configure_Exclusions.xls
4. Configure_Hardwires.xls
5. Configure_Routes.xls
6. Configure_RouteGroups.xls
NOTE:
- You should not have an existing NISE virtual device called "NISE Example".
- Your should already have 2 NISE Virtual devices called "SampleMatrix1" and "SampleMatrix2" installed with NISE 2.1.
Requirements
Filename: 200017.zip
Software Requirements
Application Software: NI Switch Executive
Language(s): VBA
Additional Software: Microsoft Excel 2002
Hardware Requirements
Hardware Group: Switches
Driver: IVI Compliance Package 2.3
Reader Comments | Submit a comment »
configure_channels.xls does not handle comments correctly
There is a small bug in the
Configure_Channels.xls example:
The statement
sevd.Comment = Cells(rowIndex, 6)
should be changed to
sevdChannel.Comment = Cells(rowIndex, 6)
so that the comments entered into the EXCEL
sheet become attached to the channels instead
of the Device
As the example does not contain any entries
in the "Comment" column this bug is not
obvious until you try the code with yout own
data.
You may also notice that this method of
configuring does not work on channels once
they have been set to "disabled". In that
state they cannot be accessed any more using
the FullName format.
Apart from these small problems I found the
examples a great help.
We decided to use EXCEL for configuring and
documentation instead of the interactive NISE
interface because this allowed us to group
corresponding channels (chx/comx,
noy/ncy/comy, ...) and move them around a
bit. Just when I started thinking about a way
to import the EXCEL data into the switch
executive I stumbled upon these nice small
examples. Having no experience with VBA at
all I got my own subroutine running in no
time. Only error handling took some more
consideration.
Thanks
Anke
- schenk1@esw-wedel.de - Feb 7, 2006
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
