hexagon logo

How to access list of UDE Instances (Vibration plugin elements) with Python?

In Adams View, I am struggling to find a way to list the different input/output channels and actuators with a Python script. I don't know where these elements are located in the active model's structure.
 
model_elements
Are they located somewhere else because Vibration is a plugin?
Parents
  • Yes, what I was saying is there is no *python* exposure to UDEs before Adams 2020. So the only workaround I know of is to call the cmd equivalent to get the names. Something like this:
     
    >>> evaluate_exp("db_children(.{}, 'ac_spring')".format(Adams.defaults.model.name))('.MDI_FRONT_SUSPENSION.nsl_ride_spring', '.MDI_FRONT_SUSPENSION.nsr_ride_spring')
     
    You need to replace 'ac_spring' with the specific UDE from Vibration (I don't know vibration).
     
     
     
Reply
  • Yes, what I was saying is there is no *python* exposure to UDEs before Adams 2020. So the only workaround I know of is to call the cmd equivalent to get the names. Something like this:
     
    >>> evaluate_exp("db_children(.{}, 'ac_spring')".format(Adams.defaults.model.name))('.MDI_FRONT_SUSPENSION.nsl_ride_spring', '.MDI_FRONT_SUSPENSION.nsr_ride_spring')
     
    You need to replace 'ac_spring' with the specific UDE from Vibration (I don't know vibration).
     
     
     
Children
No Data