[Pregunta] Text values using PythonParts


Hello everyone! I have some questions in PythonParts.

1. Is it possible to get text value from model using python script?
2. Is it possible to get attribute value from existing object using python?

GeometrySelectInteractor in Examples folder shows simple way how to use
python API to get geometry values but i can't find any information about attributes
and texts.

If you have any information about it, please give me know.

1 - 5 (5)
  • 1

Hi Kriks,
tried it multiple times, also digging through documentation... well, still I am not 100% sure, but almost sure that you cannot access objects that were created before creating your PythonPart as a result of normal Allplan commands.
Although there is GUID for each object (see https://pythonparts.allplan.com/ -> NemAll_Python_Utility) and in IFW_Input module you have GetInputViewDocument methods which allow you to get active document... the document is a DocumentAdapter instance, you can get DocumentID of it, but that's where I have no more ideas

Thank you for answer. It upsets me a little. Hope in future we' ll get additional methods for attributes and texts manipulations with further extension of API.

did you figure it out how to do this?

With Allpan 2018-1-10 It is possible to get list of attribute values from model objetcts using ElementsAttributeService class from NemAll_Python_BaseElements

1 - 5 (5)
  • 1

https://campus.allplan.com/ utiliza cookies  -  Aqui

Acéptalo