Forum de la communauté Allplan

[Question] PythonPart as Fixure [Résolu]


Hello everyone,

i know that smartpart can be a fixture: symbol fixture, line fixture and so on.

Is it possible to create a Pythonpart as a fixture? I would be grateful for a simple example of a symbol fixture pythonpart.

Show solution Hide solution

Hi Serhii,

so answering this: partially yes. You can create a PythonPart, that will generate/create fixtures for you based on parameters. It#s basically what the example is doing. But the generated fixture is fixed: you cannot modify it by double-click like a SmartPart. What you can do is create a new one with new parameters and replace the old one. I know, it's a two-step workflow and not quite like a Revit family.

Would this solve your problem?

Best,
Bart

Hi Serhii,

You can create Fixtures with Python API. I am not sure, whether that is equal to creating PythonPart as a fixture. If you e.g. run the example FixturePointPlacement, you will see, that you can create a point fixture. However, unlike with a fixture created with a SmartPart script, you cannot double click on it in order to modify it. Achieving this is currently not possible.

Can you specify the question a little more?

Best,
Bart

Hi Bart,

thank you for the answer. Acctually i was wondering if i could use pythonparts as fixtures like Families in Revit. It would be nice to have only one fixture with many types instead of dozen.

Hi Serhii,

so answering this: partially yes. You can create a PythonPart, that will generate/create fixtures for you based on parameters. It#s basically what the example is doing. But the generated fixture is fixed: you cannot modify it by double-click like a SmartPart. What you can do is create a new one with new parameters and replace the old one. I know, it's a two-step workflow and not quite like a Revit family.

Would this solve your problem?

Best,
Bart