PC-DMIS 2021.2 Object Library
GetSize Method
See Also  Example  Send Topic Feedback | See Object Hierarchy Chart
PCDLRN ActiveX DLL > StringArray Object : GetSize Method

Glossary Item Box

Description

This method queries an array of strings and returns the size of the array (the number of items contained in the array).

Syntax

Visual Basic
Public Function GetSize() As Long

Return Type

Long value of the number of strings contained in the array.

Example

This example defines an array of four items and assigns the size of the array to the size variable. It then gets the value of the second item in the array "MiniRoutine2" and assigns that value to the stringItem2 variable.
Example (C#)Copy Code
var stringArray2 = part.GetStringArray();
stringArray2.SetSize(4);
stringArray.SetValue(1, "OP10");
stringArray.SetValue(2, "MiniRoutine2");
stringArray.SetValue(3, "MiniRoutine3");
stringArray.SetValue(4, "MiniRoutine4");
var size = stringArray2.GetSize();
var stringItem2 = stringArray2.GetValue(2);

See Also

Copyright © 2021. Hexagon Manufacturing Intelligence – Metrology Software, Inc. All Rights Reserved.