PLATE SELECTION VIA OPEN STAAD

Dear All,


I am not able to select Plates using OpenSTAAD.

I have created group "aaaa" for for some plates.

here is code

Sub Main()
Dim objOpenSTAAD As Object
Dim  aaaa As String
Set objOpenSTAAD = GetObject( , "StaadPro.OpenSTAAD")
objOpenSTAAD.View.SelectGroup (aaaa)
End Sub

Please guide.

Regards,
PN

Parents
  • Sekecting Plates.xlsmYou are right. Prima facie, "View.SelectGroup" function does not appear to be working the way it should.  We will check this further. Also, please find below a macro in selecting a group of plates which uses the Geometry.SelectMultiplePlates function. However, the coding is very basic in the sense it expects the plates to be numbered sequentially and that you are not selecting more than 50 plates at a time. I have attached the excel sheet herewith.

    Private Sub CommandButton1_Click()

    Dim objOpenSTAAD As Object

    Dim start_plate As Long

    Dim end_plate As Long

    Dim no_of_plates As Long

    Dim count As Long

    start_plate = Cells(1, 2).Value

    end_plate = Cells(2, 2).Value

    no_of_plates = 1 + (end_plate - start_plate)

    Dim plateno(50) As Long

    Set objOpenSTAAD = GetObject(, "StaadPro.OpenSTAAD")

    For count = 1 To no_of_plates

    plateno(count - 1) = start_plate + count - 1

    Next

    objOpenSTAAD.Geometry.SelectMultiplePlates plateno

    Set objOpenSTAAD = Nothing

    End Sub

    Sudip Narayan Choudhury

Reply
  • Sekecting Plates.xlsmYou are right. Prima facie, "View.SelectGroup" function does not appear to be working the way it should.  We will check this further. Also, please find below a macro in selecting a group of plates which uses the Geometry.SelectMultiplePlates function. However, the coding is very basic in the sense it expects the plates to be numbered sequentially and that you are not selecting more than 50 plates at a time. I have attached the excel sheet herewith.

    Private Sub CommandButton1_Click()

    Dim objOpenSTAAD As Object

    Dim start_plate As Long

    Dim end_plate As Long

    Dim no_of_plates As Long

    Dim count As Long

    start_plate = Cells(1, 2).Value

    end_plate = Cells(2, 2).Value

    no_of_plates = 1 + (end_plate - start_plate)

    Dim plateno(50) As Long

    Set objOpenSTAAD = GetObject(, "StaadPro.OpenSTAAD")

    For count = 1 To no_of_plates

    plateno(count - 1) = start_plate + count - 1

    Next

    objOpenSTAAD.Geometry.SelectMultiplePlates plateno

    Set objOpenSTAAD = Nothing

    End Sub

    Sudip Narayan Choudhury

Children
No Data