icon

Support Forum

[Frage] Bildschirm-Massstab auslesen

Schlagworte:
  • PythonParts
  • GetScreenScale
  • NemAll_Python_IFW_Input
  • ViewWorldProjection
  • GetViewWorldProjection
  • 2025

Hallo zusammen

ich habe ein Standard-PythonPart, in dem ich den Bildschirmmassstab über ViewWorldProjection.GetScreenScale() auslesen möchte.
Der untenstehende Code hat in Allplan 2024 noch funktioniert, in Allplan 2025 erhalte ich jedoch eine Fehlermeldung.

Kennt jemand einen Workaround oder eine alternative Methode, um den Bildschirmmassstab in Allplan 2025 auszulesen?

vp = AllplanIFWInput.InputViewDocumentData.GetViewWorldProjection()
if vp:
    scale = vp.GetScreenScale()

Boost.Python.ArgumentError: Python argument types in
    InputViewDocumentData.GetViewWorldProjection()
did not match C++ signature:
    GetViewWorldProjection(class Allplan::IFW::Input::InputViewDocumentData {lvalue})

Gruss und Dank
Hansruedi

in Allplan 2026 PythonFramework und Examples finde ich nur folgende Verwendung:

view_proj = self.coord_input.GetViewWorldProjection()

Es gibt also scheinbar keine statische Methode GetViewWorldProjection() mehr.
Man braucht dazu ein AllplanIFW.CoordinateInput-Object, welches man scheinbar nur bei einem Interactor-PythonPart bekommt.