I am a beginner in the "Python in Adams" world. I would like to create a function which makes it possible to add (and later remove) a given number of rows to an existing spline.
As I sometime have to copy/paste splines into Adams, it happens that I have to add (or delete) a large amount of rows before I can do so in order to match the length of the spline with the new input. Doing that manually is not fun if that number is big so I thought this could be a nice first tool to code in Python.
I started to write a function called "add_lines".
The inputs are:
spline_id: id of the spline to be updated
n_lines: number of lines to be added
It works fine until I try to add the new empty rows. By empty I mean [0,0]. My approach doesn't seem correct and I am wondering how I should proceed.
I am able to access the spline of interest and get the current values. But I don't know how to add or remove lines. Here is what I tried to do: