General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

How add annotations or probes using python script in Mechanical 2020?

    • hallinenjesse
      Subscriber

      I have been trying to add annotations with python scripting in Mechanical version 2020 but it seems I'm missing something or maybe in 2020 version it can't be done. I have searched other similar topics and it seems in newer versions there is LabelManager class but in v2020 I have to use functions in Graphics.InternalObject or call javascript functions directly.

      The problem seems to be that the annotation won't get inserted into 3d view, even though annotation values are visible in Graphics Annotations table when editing them but after editing the table rows usually also disappear. Only if user have inserted the annotation manually then I can edit the values in Graphics Annotations table using python without rows disappearing. I also noticed that if I run correct python or javascript functions straight after Mechanical restart then the first annotation gets inserted into 3d view, so it kind of seems that my python code is missing the part what happens when user clicks the 3d view to place the annotation. Any idea how to do this?

    • Ashish Khemka
      Forum Moderator

      Hi,

      I think Matthew did answer your query in another post.

       

      Regards,

      Ashish Khemka

      • hallinenjesse
        Subscriber

        Yeah, he did, sorry for reposting, I thought my posts didn't get submitted because last week My Posts view was always empty.

    • Ashish Khemka
      Forum Moderator

      No problem, thanks for the update. I will close this thread.

      Regards,

      Ashish Khemka

Viewing 2 reply threads
  • The topic ‘How add annotations or probes using python script in Mechanical 2020?’ is closed to new replies.