efdiloreto / PyTekla

Bringing CPython power to Tekla
MIT License
7 stars 3 forks source link

Wrap other parameter from tekla #1

Closed Raimond1233 closed 11 months ago

Raimond1233 commented 12 months ago

Hello Eduardo, I'm very interested in your project. But I don't know how to "wrap" other parameters from Tekla, such as: part_prefix, part_startnumber, assembly_prefix... Could you help with ? Thank you in advance :)

efdiloreto commented 12 months ago

Sure! Let me create an example

Raimond1233 commented 12 months ago

Super thanks Eduardo :)

efdiloreto commented 11 months ago

@Raimond1233 My Tekla license is expired, so I cannot try the code in an actual model.

For setting the part number to a part I would do this, referring to this API

numbering_series = wrap("Model.NumberingSeries")
numbering_series.prefix = "P"
numbering_series.start_number = 1

part.part_number = numbering_series

model.commit_changes("Some Changes")

Let me know if this works for you.

Raimond1233 commented 11 months ago

Super. Thanks a lot Eduardo :)