Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

We Value Your Feedback!
Could you please spare a few minutes to share your thoughts on Cloud Connected vs On-Premise Services. Your feedback can help us shape the future of services.
Learn more about the survey or Click here to Launch the survey
Schneider Electric Services Innovation Team!

Using ServerObject.Interface to read array-based properties

EcoStruxure Geo SCADA Expert Forum

Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • Remote Operations
  • EcoStruxure Geo SCADA Expert Forum
  • Using ServerObject.Interface to read array-based properties
Options
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
sbeadle
Kirk sbeadle Kirk
308
AndrewScott
Admiral AndrewScott
98
BevanWeiss
Spock BevanWeiss
91
AdamWoodlandToo
Lt. Commander AdamWoodlandToo
37
View All
Related Products
product field
Schneider Electric
EcoStruxure™ Geo SCADA Expert

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Solved Go to Solution
Back to EcoStruxure Geo SCADA Expert Forum
Solved
rlao
Lt. Commander rlao
Lt. Commander

Posted: ‎2019-11-28 10:28 PM . Last Modified: ‎2023-05-03 12:20 AM

0 Likes
3
2354
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2019-11-28 10:28 PM . Last Modified: ‎2023-05-03 12:20 AM

Using ServerObject.Interface to read array-based properties

Hi all,

 

Is it at all possible to read array-based properties using ServerObject.Interface in Scripting?

 

I am trying to read out the VectorValues property of a CProfileFloat profile object and populate a Form with the individual array values.

 

I can't get ServerObject.Interface to work at all as it complains about type mismatches.

 

I was doing something like:

 

Set FlowProfile = Server.FindObject(sFlowProfilePointFullName)

Vector1 = FlowProfile.Interface.VectorValues(0)

 

which did not work.

 

What is the correct way to do this?

Labels
  • Labels:
  • SCADA
  • Scripting
Reply

Link copied. Please paste this link to share this article on your social media post.

  • All forum topics
  • Previous Topic
  • Next Topic

Accepted Solutions
AndrewScott
Admiral AndrewScott
Admiral

Posted: ‎2019-11-29 01:33 AM

1 Like
1
2341
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2019-11-29 01:33 AM

The following JScript example works in a mimic script:

 

var Profile = Server.FindObject( "Time Profiles.Float" );
var Values = Profile.Interface.VectorValues;
var Times = Profile.Interface.VectorTimes;

var FirstValue = Values.getItem(0);
var FirstTime = Times.getItem(0);

 

I've not tried this from VBScript.

 


Andrew Scott, R&D Principal Technologist, AVEVA

See Answer In Context

Reply

Link copied. Please paste this link to share this article on your social media post.

Replies 3
BevanWeiss
Spock BevanWeiss
Spock

Posted: ‎2019-11-28 11:26 PM . Last Modified: ‎2019-11-29 02:12 AM

1 Like
0
2350
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2019-11-28 11:26 PM . Last Modified: ‎2019-11-29 02:12 AM

@rlao works for me...

 

Dim scxServer As ScxV6Server
Set scxServer = New ScxV6Server
scxServer.Connect "Test", "superuser", "superusersuperuser"
Dim objDoubleArray As ScxV6Object
Set objDoubleArray = scxServer.FindObject("New Float")

Dim arrDoubleArray
arrDoubleArray = objDoubleArray.Property("VectorValues")

 

[apologies for bad variable names etc etc... definitely awkward having an array called 'arrDoubleArray' that is full of 'Singles' ;)]


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
Reply

Link copied. Please paste this link to share this article on your social media post.

AndrewScott
Admiral AndrewScott
Admiral

Posted: ‎2019-11-29 01:33 AM

1 Like
1
2342
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2019-11-29 01:33 AM

The following JScript example works in a mimic script:

 

var Profile = Server.FindObject( "Time Profiles.Float" );
var Values = Profile.Interface.VectorValues;
var Times = Profile.Interface.VectorTimes;

var FirstValue = Values.getItem(0);
var FirstTime = Times.getItem(0);

 

I've not tried this from VBScript.

 


Andrew Scott, R&D Principal Technologist, AVEVA
Reply

Link copied. Please paste this link to share this article on your social media post.

rlao
Lt. Commander rlao
Lt. Commander

Posted: ‎2019-11-29 03:15 AM

In response to AndrewScott
0 Likes
0
2331
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2019-11-29 03:15 AM

Hi Andrew,

 

I'm trying to do this in VBScript, but your reply actually helped me figure out what I was doing wrong.

 

Basically, in addition to what I was doing in my original post, I was also trying to read VectorValues out into a ReDim variable sized to the MaxVectors of the float profile. Turns out that doesn't work and the solution was actually much, much simpler than what I was trying to do.

 

It was more or less like your JScript answer:

 

Set FlowProfile = Server.FindObject(sFlowProfileFullName)
Dim FlowArray
FlowArray = FlowArray.Interface.VectorValues

Flow1 = FlowArray(0)
Flow2 = FlowArray(1)
Flow3 = FlowArray(2) etc...

 

Extremely simple and I can't believe it took me this long to figure out.

Reply

Link copied. Please paste this link to share this article on your social media post.

Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of