Skip to content

Polyline input

Allplan offers a standard polyline input functionality e.g., to define the area of a slab or room. The input toolbar looks like this:

Polyline input toolbar

Execute the input

To initialize the polyline input in an Interactor PythonPart, construct the PolylineInput object. After the instantiation the tool bar shown above appears.

polyline_input = AllplanIFW.PolylineInput(coord_input, True)

To execute the input, the method ExecuteInput must be called in the process_mouse_msg function of the interactor

polyline_input.ExecuteInput(mouse_msg, pnt, msg_info)

To get the created polyline you can use the method GetPolyline or GetPreviewPolyline. The second one preferably for the creation of a preview.

polyline = polyline_input.GetPolyline()

Terminate the input

To cancel the input, assign None to the variable containing the PolylineInput object.

polyline_input = None


A use of the polyline input is implemented in the example PolylineInput located in:

  • …\etc\Examples\PythonParts\InteractorExamples\BaseInput\PolylineInput.pyp
  • …\etc\PythonPartsExampleScripts\InteractorExamples\BaseInput\