Python API to assign LCS to a node

Sudhir_Ingstron
Sudhir_Ingstron Altair Community Member

I have a local coordinate system in my model, and I need to assign this system as the displacement coordinate system to a node. Please help with the Python API for this.

Thank you

Sudhir

Best Answer

  • Adriano_Koga
    Adriano_Koga
    Altair Employee
    Answer ✓

    using the new Python Recorder in 2025.0 i got this:

    import hm
    import hm.entities as ent

    def run():
    from hm.mdi import apis
    model = apis.HmModelDebug()

    model.setreviewtransparentmode(mode=0)

    collection = hm.Collection(model, hm.FilterByEnumeration(ent.Node, ids=[2, 4]))
    system_entity = ent.System(model, 2)
    # [TIP]: systemsetanalysis is deprecated.
    model.systemsetanalysis(collection=collection, system_entity=system_entity)

    model.setreviewtransparentmode(mode=1)

    model.setreviewtransparentmode(mode=0)

Answers

  • Adriano_Koga
    Adriano_Koga
    Altair Employee
    Answer ✓

    using the new Python Recorder in 2025.0 i got this:

    import hm
    import hm.entities as ent

    def run():
    from hm.mdi import apis
    model = apis.HmModelDebug()

    model.setreviewtransparentmode(mode=0)

    collection = hm.Collection(model, hm.FilterByEnumeration(ent.Node, ids=[2, 4]))
    system_entity = ent.System(model, 2)
    # [TIP]: systemsetanalysis is deprecated.
    model.systemsetanalysis(collection=collection, system_entity=system_entity)

    model.setreviewtransparentmode(mode=1)

    model.setreviewtransparentmode(mode=0)
  • Sudhir_Ingstron
    Sudhir_Ingstron Altair Community Member

    Thank you for your response, Adriano.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.