How to add an image underneath an ACT custom (post) object in Mechanical?

Options
Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 414
First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
edited June 2023 in Structures

How to add an image underneath an ACT custom (post) object in Mechanical?

enter image description here

Tagged:

Answers

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 414
    First Anniversary Ansys Employee Solution Developer Community of Practice Member First Answer
    Answer ✓
    Options
    # Retrieve your post object - `post_object`
    post_internal_object = post_object.InternalObject
    image = post_internal_object.AddImage()
    image.SourceType = 1
    image.ImagePath = image_path  # Provide complete path to the image to be added.
    
    ExtAPI.DataModel.Tree.Refresh()