Support Forum

[Frage] Creating views in PythonParts [Gelöst]

Schlagworte:
  • Allplan 2017
  • PythonParts
  • AssociativeViewService
  • CreateViews

Hi,

I'm trying to create views through Pythonparts.

I found a class:

class AssociativeViewService(Boost.Python.instance)

Method resolution order:
AssociativeViewService
Boost.Python.instance
builtins.object
Methods defined here:

CreateViews(...)
CreateViews( (AssociativeViewService)arg1, (VecGUIDList)elementVec, (list)assoViewList, (ViewWorldProjection)viewProj) -> MinMax2DList :
Create the associative views

Parameter: elementVec Vector with the elements for the associative views
assoViewList List with the data for the associative views
viewProj View world projection

Return: List with the MinMax2D of the created views.
__init__(...)

That supouselly can interact with Allplan objects and automatically insert views.

Is there a exemple of this (or any correspondent) function in use to create 2D views?

Thank you!

Lösung anzeigen Lösung verbergen

Hi,

This module allows you to generate associative views by script.

There is an example with the hotfix 2018-0-5 :

C:\ProgramData\Nemetschek\Allplan\2018\ETC\PythonPartsScripts\ReinforcementExamples => AssociativeViews.py

I recommend you to put this folder in shorcut in the library.

Best

Christophe

Hi,

This module allows you to generate associative views by script.

There is an example with the hotfix 2018-0-5 :

C:\ProgramData\Nemetschek\Allplan\2018\ETC\PythonPartsScripts\ReinforcementExamples => AssociativeViews.py

I recommend you to put this folder in shorcut in the library.

Best

Christophe

Christophe,

My company is using allplan 2017. I'll install 2018-0-5 on my machine to get access to this exemple.

Thank you!

Diogo