This project is read-only.
When you work with this Library there are mainly two parts:
Lists and Objects

An Object only provides the dtructure for holding the data.
A List, holds every found Object and provides Methods for searching the desired Objects.

In this example, we will list the ID, the Prototype and the start- and endpoint of their axis, from every found wall.

First of all, start Speedikon and the integrated VBA-Editor. Here you have to add the reference to the dll.
Open the Menu Extras->References, search for SpeedikonObjectModel and tick the checkbox in front of it.

Now paste the following Code in a Module and press F5. Thats it. :)

Sub ListWalls()
  'Used for the For-Loop
  Dim i As Integer
  'This is our List, which provides the method for searching all walls
  Dim Walls As New SpeedikonObjectModel.WallList
  'This is our Object, which holds the internal data
  Dim Current As SpeedikonObjectModel.Wall
  'Tell the List to start scanning and save the result in "C:\Walls.xml"
  'If you don't want to save the List, just call it without path: Walls.ScanWalls ("")
  Walls.ScanWalls ("C:\Walls.xml")
  'Loops through every found wall
  For i = 0 To Walls.count - 1
    'Gets the Wall at index i and stores it in the variable Current
    Set Current = Walls.GetWall(i)
    'Print out the desired information
    Debug.Print ("ID: " & Current.ID & vbTab & "Prototyp: " & Current.A_PROTOTYPE)
    Debug.Print ("Startpunkt x: " & Current.StartPointAxis.x & vbTab & "y: " & _
                  Current.StartPointAxis.y & vbTab & "z: " & Current.StartPointAxis.Z)
    Debug.Print ("Endpunkt x: " & Current.EndPointAxis.x & vbTab & "y: " & _
                  Current.EndPointAxis.y & vbTab & "z: " & Current.EndPointAxis.Z)
    'Prints an empty line to keep it more readable
    Debug.Print ("")
End Sub

Last edited Feb 28, 2013 at 10:24 AM by BiedermannS, version 1


No comments yet.