Solids Builder - Get Property


Get Property - gets the value of the properties of devices connected upstream or downstream of the current device. It also allows you to get information that doesn't appear in the when of constructor properties, such as the top dimension of structures:

The Get Property activity has the following properties:

This activity should be used in conjunction with the TryCatch activity as it may cause the runtime errors:

  1. In edit mode - Occurs while editing the model. While editing, there isn't a device being modeled, so there's no way to get anything
  2. No output device - occurs when the search Device option is equal to Output but there is no device connected to the output
    For example: it is necessary to check if the dimension of the pipe connected to the outlet is compatible with the dimension of the bottom of the manhole and adjust the dimension of the bottom if necessary
  3. Index is out of range - occurs when the search Device option is equal to Entries but the Index b> informed is less than ZERO, or greater than the number of devices connected to the input minus 1 (the first index is zero)
  4. There is no input device at this index - should not occur, as the error above predicts this situation. However, something unexpected may happen anyway
  5. This property does not exist - The property informed in the Parameter Name field does not exist in the device
    Example: searching for "CD" (dimension of the lower downstream internal generatrix) on a ladder does not make sense on ladders, only on Pipes
  6. The property is of a different type - if the property exists, it could be that it is of a different type and this error occurs
    Example: searching for "PipeLines" on pipes returns an integer, but setting the Variable Type field to Point will cause this error because it is not possible to convert an integer to a point

Consider the example from the beginning. This example shows the typical flowchart to obtain the lowest elevation of the lower downstream generator of connected pipes in a manhole:

The algorithm is quite simple:

  1. Create a variable to receive the minimum value to be calculated (DCminimum), define it as positive infinity
  2. Create an incrementing variable (nEntry), to get the nth device from the upstream, set it to ZERO
  3. Get the value or from CDin of nth tube
  4. Compare CDin with MinimumCD and if smaller,
  5. Save the CDin value in MinimumCD
  6. Increment the index and
  7. Back to step 3

Note that this looping does not check the device number in the input and it is not even necessary, because in the case of trying to obtain the CDin value with a index greater than the number of entries, an error will be thrown, which is trapped by the TryCatch activity

In case you want to get a property of the current device, or of the output, looping doesn't make sense. But you still have to use the TryCatch as other errors may occur.

Also note that depending on the property you want to obtain, it may be out of date when calling this activity. The above example is the case as the "CD" Elevation is only updated at the time the pipe is rebuilt. In this case, it will be better to get the "EndPoint" of the pipe and the "Diameter", as these usually do not change during the pipe reconstruction, and then calculate an variable:

CD = EndPoint. Z - Diameter / 2

Where:
CD = Elevation of the lower internal generatrix at the end of the tube
EndPoint = coordinate of the end point of the tube
Diameter = nominal or internal diameter of the pipe
Also note that for the purpose of reconstructing the pipe, its three-dimensional axis is located in the center of the cross section, so Diameter/2 in the equation above