Reputation: 848
I'm in the process of transfering our VBA AutoCAD script to VB.NET but i came across a warning. VB.net 2010 give me a warning that this code is obsolute, and probally won't work with 64 bit.
The program needs to be 64 compatibel because of the problems with our vba file and AutoCAD 2012 & Windows 7 X64. What do i need to use instead of VB6.CopyArray?
If Flipline = True Then
P1 = VB6.CopyArray(Endpoint)
P2 = VB6.CopyArray(Beginpoint)
Else
P1 = VB6.CopyArray(Beginpoint)
P2 = VB6.CopyArray(Endpoint)
End If
Upvotes: 0
Views: 1526
Reputation: 28573
According to MSDN documentation for Support.CopyArray:
The Visual Basic 6.0 Variant data type is no longer supported in Visual Basic 2010. The CopyArray function is used by the upgrade tools to copy an Array to or from a Variant array.
To copy an array in Visual Basic 2010, use the Clone, Copy or CopyTo methods of the Array class.
If Endpoint
is an array, then:
P1 = Endpoint.Clone()
Upvotes: 5