Dimension/Balloon Position in SolidWorks API

Does anyone know the code to change the position of an existing dimension/balloon in a drawing using API. I tried recording a macro and changing the position of an existing position but not sure what to edit in that form or if I am missing a piece of code.

boolstatus = Part.Extension.SelectByID2("RD1@DV2", "DIMENSION", 0.09981805854007, 0.1594310762463, 0, False, 0, Nothing, 0)

Thanks,

James

SolidworksApi macros
Answers 7
DG
DG 2011-08-19 Best Answer
<p>James Gannatal wrote:</p><p></p><p></p><p>boolstatus = Part.Extension.SelectByID2("RD1@Drawing View2", "DIMENSION", 0.09981805854007, 0.1594310762463, 0, False, 0, Nothing, 0)</p><p></p>

These values 0.09981805854007, 0.1594310762463, 0, in the code represents X Y and Z coordinates in meters. So need to modufy them for a new position

JG
JG 2011-08-19

Deepak,

Figured thats what those values represented but tried modifying them and the macro would select that dimension but would not move it to the designated position.

James

DG
DG 2011-08-19

Oh sorry, I should have mentioned that you need to use SetPosition

JG
JG 2011-08-19

You wouldn't happen to have an example using SetPosition to move the position of a dimension.

WM
JG
JG 2011-08-29

Thanks everyone,

SetPosition works perfect.

Thanks,

James