Changing the length of a detail line in a project

I’ve tried to vigor this out all morning but it’s just not working.
I’m trying to get the length parameter of a detail line to be changable but when I try the setparameterbyname, it says “the parameter is read-only”.
Does anyone know a work around or a loop hole of some kind?

Thanks for the effort,

You cannot change de length of a detail line by changing the length. You must instead adjust the start and end points. Revit cannot resolve how should it extend or shrink the line. This is a rather ubiquitous issue in Revit (beams, dimensions)

If you’re talking about a detail item line based, then is another story.

Thanks but how do I set this start and end point?

I think you’ll be better off recreating the detail line with the right parameters and length. Modifying would be, in my view, a bit of overkill

You can also try the Element.SetLocation node.