Home > Net >  From "ref System. Array" into "ref double []", how to deal with
From "ref System. Array" into "ref double []", how to deal with

Time:09-26

Statement:
Private void DrawPool (ref cSapModel SapModel)
{
Double dPoolLen=this. M_wndData. M_dPoolLen;
Double dPoolWidth=this. M_wndData. M_dPoolWidth;
Double topLevel=this. M_wndData. GetTopLevel ();
Double z=this. M_wndData. GetBottomLevel ();
SapModel. SetPresentUnits (eUnits. KN_m_C);
String [] array=new string [6].
Array [] array2=new Array [6].
Array [] array3=new Array [6].
Array [] array4=new Array [6].
Point3d Point3d=new Point3d (0.0, 0.0, topLevel);
Point3d point3d2=new Point3d (dPoolLen, 0.0, topLevel);
Point3d point3d3=new Point3d (dPoolLen dPoolWidth, topLevel);
Point3d point3d4=new Point3d (0.0, dPoolWidth topLevel);
Point3d point3d5=new Point3d (0.0, 0.0, z);
Point3d point3d6=new Point3d (dPoolLen, 0.0, z);
Point3d point3d7=new Point3d (dPoolLen dPoolWidth, z);
Point3d point3d8=new Point3d (0.0, dPoolWidth, z);
Enclosing GetPointArrary (point3d, point3d4 point3d3, point3d2, ref array2 [0], ref array3 [0], ref array4 [0]).
SapModel. AreaObj. AddByCoord (ref 4, array2 [0], ref array3 [0], ref array4 [0], ref array [0], "TopArea", "0" and "Global");
Enclosing topArea=array [0];
Enclosing GetPointArrary (point3d, point3d2 point3d6, point3d5, ref array2 [1], the ref array3 [1], the ref array4 [1]).
SapModel. AreaObj. AddByCoord (ref 4, array2 [1], the ref array3 [1], the ref array4 [1], the ref array [1], "WallArea", "1", "Global");
Enclosing wallAreaxz=array [1].
Enclosing GetPointArrary (point3d4, point3d point3d5, point3d8, ref array2 [2], the ref array3 [2], the ref array4 [2]).
SapModel. AreaObj. AddByCoord (ref 4, array2 [2], the ref array3 [2], the ref array4 [2], the ref array [2], "WallArea", "2", "Global");
Enclosing wallAreayz=array [2];
Enclosing GetPointArrary (point3d5, point3d6 point3d7, point3d8, ref array2 [3], the ref array3 [3], the ref array4 [3]).
SapModel. AreaObj. AddByCoord (ref 4, array2 [3], the ref array3 [3], the ref array4 [3], the ref array [3], "BottomArea", "3", "Global");
Enclosing bottomArea=array [3].
Enclosing GetPointArrary (point3d3, point3d4 point3d8, point3d7, ref array2 [4], ref array3 [4], ref array4 [4]);
SapModel. AreaObj. AddByCoord (ref 4, array2 [4], ref array3 [4], ref array4 [4], ref array [4], "WallArea", "4", "Global");
Enclosing wallAreaxzy=array [4];
Enclosing GetPointArrary (point3d2, point3d3 point3d7, point3d6, ref array2 [5], ref array3 [5], ref array4 [5]);
SapModel. AreaObj. AddByCoord (ref 4, array2 [5], ref array3 [5], ref array4 [5], ref array [5], "WallArea", "5", "Global");
Enclosing wallAreayzx=array [5];
}
The enclosing GetPointArrary (point3d point3d4, point3d3, point3d2, ref array2 [0], ref array3 [0], ref array4 [0]). Ref in array2 [0], ref array3 [0], ref array4 [0] needs to be "System. Array", and SapModel. AreaObj. AddByCoord (ref 4, array2 [0], ref array3 [0], ref array4 [0], ref Array [0], "TopArea", "0" and "Global"); Need "ref double []"

In order to upgrade, such problems after transplantation,

CodePudding user response:

System. An Array is inside the object and you double is to specify the type, so you should pass the corresponding Array, and then you can debug again to see the result to you

CodePudding user response:

In the API, this is a software AOPI asked for ref double [] ", there is no error in low version, transplanted into high version appear such problems,

CodePudding user response:

If your array is double [], you can add casts a look at

CodePudding user response:

Define an Array with double [], don't use Array, can be compiled through
  •  Tags:  
  • C#
  • Related