Skip to content
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

ZMT zurich med tech

  1. Home
  2. Sim4Life
  3. Python API
  4. Accessing specific entities of my model from the python API

Accessing specific entities of my model from the python API

Scheduled Pinned Locked Moved Python API
2 Posts 1 Posters 178 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lauener
    wrote on last edited by
    #1

    I am writing a jupyter script for a simulation.
    I want to be able to run the script several times, to try out new things, without the script recreating a new "Model" everytime (because then i keep having multiples of my model in the modelling tab).
    How can I check my smash file for an existing model, from my script.
    The goal would be to have a line of code, which first checks if there already is an existing model, before then running my "createModel" function.
    How do I access that information from the script?
    I also need to access that information to still initialize those model parts, so i can use them in the simulation (without having to recreate them every time).

    Any and all inputs would be greatly appreciated!
    c2f49f04-fe3b-4089-8ed3-384b2a62c7a9-image.png

    1 Reply Last reply
    1
    • L Offline
      L Offline
      lauener
      wrote on last edited by
      #2

      found my own answer:

      image.png

      1 Reply Last reply
      1
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Search