Sets a named property of another COM object with the internal array of this object. | |
Syntax: | object.SetObjectProperty Object, PropertyName |
Parameters: |
Object As
object -
PropertyName
As String -
|
Description: | The passed COM object must implement IDispatch for
this method to work. If the contained array only has one dimensions
and one element the type library of the passed object will be
queried to determine if the named property is an array type. If it
is not an array the property is set with the value of the only
element in the array. In all other cases the property is set with
the array. Example: Private cimOleObj As CimGraphLib.DCimGraph Sub OnSmartObject() cimOleObj.Series.Add "Plot1",
apSeriesStandard Dim arX As CoCimSafeArray5 Dim arY As CoCimSafeArray5 Set arX =
CreateObject("CIMPLICITY.CimSafeArray.5") Set arY =
CreateObject("CIMPLICITY.CimSafeArray.5") arX.CreateVector cimVDouble, 0 , 100 arY.CreateVector cimVDouble, 0 , 100 Dim i As Integer For i = 0 To 99 arY.SetVectorElement i, sin(i/10) *
10 + 10 arX.SetVectorElement i, i Next i Dim sdatax As Object Dim sdatay As Object Set sdatax =
cimOleObj.Series("Plot1").Data.X Set sdatay =
cimOleObj.Series("Plot1").Data.Y arY.SetObjectProperty sdatay, "Value" arX.SetObjectProperty sdatax, "Value" End Sub |
See Also: | SetObjectProperty , CallObjectMethod , GetObjectPropertyEx , SetObjectPropertyEx |