Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Array: Doesn't Support Property or Method

Status
Not open for further replies.

lardman363

Automotive
Feb 8, 2013
173
US
I have an array containing objects (surfaces) and a second array equal to the first. The size of the first array is redimmed(wipes out the contents), then the second array, fills the first array.

aObjects = aTemp
ReDim aObjects(aObjects-1)
For I = 0 to ubound (aObjects)
aObjects(I) = aTemp(I)
Next

But when it gets to aObjects(I) = aTemp(I), I get "object does not support property or method" on aObjects. What would cause this?

Any help would be appreciated.
 
Replies continue below

Recommended for you

I usually use SET to assign object

The follwing code works for me

Code:
Dim aTemp(2)  As Variant
Dim a As Parameters

Dim aObjects

Set a = CATIA.ActiveDocument.Part.Parameters

Set aTemp(0) = a.Item(1)
Set aTemp(1) = a.Item(2)
Set aTemp(2) = a.Item(3)
aObjects = aTemp

Eric N.
indocti discant et ament meminisse periti
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top