What do you want to change?
The number of shown numericals? It's governed by the drawing standard. You can edit it (if you're allowed) to your desires and it'll show the standard value for dimensions.
DO you want to show a fake value (line = 132 but value = 150) or do you wan the geometry to adapt to new value?
in your case it seems the value will drive the geometry (not a fake value) Is that what you want ?
Not sure API could change value of driving dimension
Eric N. indocti discant et ament meminisse periti
Are we ultimately talking about the modification of purely 2D geometry in a drawing, or, is the drawing geometry projected from a 3D model and the intent is to modify the 3D model from the drawing by manipulating the drawing dimension?
If it is truly just the modification of 2D geometry, another option could be to 'drive' the value via a Parameter in the CATIA drawing perhaps then get your macro to modify the Parameter value?