Hello,
I'm working thru making some Excel files to perform different tasks with using OpenSTAAD code and I'm running into issues with some of the commands not working properly.
In this case, I cannot seem to get GetMemberMaxDeflections to work properly. There are (3) problems that I can't quite resolve that I'm seeing:
It's hard to tell, but my assumption is that in my English Unit model the results are being given to me in inches for both dMax and dMaxPos, but I can't be 100% sure.
Below is a code snippet that I used - basically I just copied from the OpenSTAAD Reference manual:
Private Sub test_click()'Get maximum section displacements in GLOBAL Y-directionDim memb As LongDim Lcase As LongDim objOpenSTAAD As ObjectDim RetVal As VariantDim strDir As DoubleDim dMax As DoubleDim dMaxPos As Double''Launch OpenSTAAD ObjectSet objOpenSTAAD = GetObject(, "StaadPro.OpenSTAAD")'Get maximum section displacementsmemb = 96 'Member IDLcase = 102 'LoadCasestrDir = 2 'Direction = 2 'GLOBAL: X = 1, Y = 2, Z = 3.RetVal = objOpenSTAAD.Output.GetMaxSectionDisplacement(memb, strDir, Lcase, dMax, dMaxPos)Cells(30, 5) = dMaxCells(30, 6) = dMaxPosSet objOpenSTAAD = NothingEnd Sub
This code yields:dMax = .047dMaxPos = 45.27It should yield something very close to 0 (0.001" deflection) since my LC 102 is only +X Loading. The 0.47 matches up quite closely, however, with the Global +Z deflection = 0.44".
Any help would be appreciated!
The help documentation related to this function is not correct. You need to define the variable type for direction as "String" variable and also specify the direction as "X", "Y" or "'Z". For example, the inputs will be like --
Dim strDir As StringstrDir = "Y"
Modify your code accordingly and this will extract correct displacement value in all global direction.
Hi, I am still having an issue with this function, even when I use the correct variable type for strDir as above. As an example:
I am getting huge numbers for some displacements, when they are completely reasonable in the GUI. Is there anything else that I should be looking for here?
Thanks
If anyone has an answer it would be great to hear! Even if it's a known bug with no current fix, it would be good to know!
As of now, there is no known error for this OpenSTAAD function and it extracts the displacement value correctly. Can you upload the relevant .std file so that I can check the results extracted by this function? Also mention the base unit configuration that you have specified in STAAD and exact build number of STAAD.Pro that you are using (go to Help > About to check).
Sure, I'm using metric base units and version 20.07.11.90 of STAAD.Pro V8i (SELECT series 6). My input is below:
STAAD SPACE 005-007START JOB INFORMATIONENGINEER DATE 25-Mar-20END JOB INFORMATIONINPUT WIDTH 79UNIT METER KNJOINT COORDINATES1 0 0 0; 2 1 0 0; 3 3.5 0 0; 4 5.5 0 0; 5 7.5 0 0; 6 8.5 0 0;7 8.875 0 0; 8 0 0 4; 9 1 0 4; 10 3.5 0 4; 11 5.5 0 4; 12 7.5 0 4;13 8.5 0 4; 14 8.875 0 4; 15 3.5 0 1.25; 16 7.5 0 1.25;MEMBER INCIDENCES1 1 2; 2 2 3; 3 3 4; 4 4 5; 5 5 6; 6 6 7; 7 8 9; 8 9 10; 9 10 11;10 11 12; 11 12 13; 12 13 14; 13 2 9; 14 3 15; 15 4 11; 16 5 16;17 6 13; 18 15 10; 19 16 12;MEMBER PROPERTY BRITISH1 TO 12 TABLE ST UB533X210X10113 TO 19 TABLE ST TUB2002005.0DEFINE MATERIAL STARTISOTROPIC StainlessSteelE 1.9e+008POISSON 0.3DENSITY 78.333ALPHA 1.2e-005DAMP 0.05G 7.612e+007END DEFINE MATERIALCONSTANTSMATERIAL StainlessSteel ALLSUPPORTS1 7 8 14 PINNEDLOAD 1 LOADTYPE Dead TITLE s/wSELFWEIGHT Y -1 MEMBER LOAD13 CON GY -0.31 0.01 013 CON GY -0.43 1.25 013 CON GY -0.43 2.45 013 CON GY -0.31 3.65 014 CON GY -0.59 0.01 014 CON GY -0.71 1.25 018 CON GY -0.43 1.55 018 CON GY -0.31 2.74 015 CON GY -0.31 1.25 015 CON GY -0.31 2.45 015 CON GY -0.31 2.8 015 CON GY -0.31 3.99 016 CON GY -0.59 0.01 016 CON GY -0.71 1.25 019 CON GY -0.43 1.55 019 CON GY -0.31 2.74 08 CON GY -0.24 1.5 0LOAD 2 LOADTYPE Dead TITLE vertMEMBER LOAD13 CON GY -0.31 1.25 013 CON GY -0.48 2.45 013 CON GY -0.17 3.65 014 CON GY -7.51 0.01 014 CON GY -8.12 1.25 018 CON GY -1.04 1.55 018 CON GY -0.74 2.74 015 CON GY -0.31 1.25 015 CON GY -0.31 2.45 015 CON GY -0.74 2.8 015 CON GY -0.74 3.99 016 CON GY -7.51 0.01 016 CON GY -8.12 1.25 019 CON GY -1.04 1.55 019 CON GY -0.74 2.74 08 CON GY -0.62 1.5 0LOAD 3 LOADTYPE Dead TITLE hori_N-SMEMBER LOAD13 CON GX -0.03 1.25 113 CON GX -0.05 2.45 113 CON GX -0.02 3.65 114 CON GX -0.75 0.01 0.814 CON GX -0.81 1.25 0.818 CON GX -0.1 1.55 118 CON GX -0.07 2.74 115 CON GX -0.03 1.25 115 CON GX -0.03 2.45 115 CON GX -0.07 2.8 115 CON GX -0.07 3.99 116 CON GX -0.75 0.01 0.816 CON GX -0.81 1.25 0.819 CON GX -0.1 1.55 119 CON GX -0.07 2.74 18 CON GX -0.06 1.5 1LOAD 4 LOADTYPE Dead TITLE hori_E-WMEMBER LOAD13 CON GZ -0.03 1.25 113 CON GZ -0.05 2.45 113 CON GZ -0.02 3.65 114 CON GZ -0.75 0.01 0.814 CON GZ -0.81 1.25 0.818 CON GZ -0.1 1.55 118 CON GZ -0.07 2.74 115 CON GZ -0.03 1.25 115 CON GZ -0.03 2.45 115 CON GZ -0.07 2.8 115 CON GZ -0.07 3.99 116 CON GZ -0.75 0.01 0.816 CON GZ -0.81 1.25 0.819 CON GZ -0.1 1.55 119 CON GZ -0.07 2.74 18 CON GZ -0.06 1.5 1LOAD COMB 5 SLS1 1.0 2 1.0 3 1.0 4 1.0 LOAD COMB 6 ULS1 1.35 2 1.5 3 1.5 4 1.5 PERFORM ANALYSIS PRINT STATICS LOADFINISH
I have reviewed this model and able to duplicate the problem. The section displacement value is extracted incorrectly using this function. I have forwarded this issue to the development team for clarification.