Jump to content

Get label's position in the 3d view


---
 Share

Recommended Posts

Hello,

is it possible to get the label's position in the 3d area? With label's position I don't mean the point, but rather the position of the rectangle. This i because I make the script that create a label deviation instead of the dN deviation and I want to replace the dN label with a deviation label in the report and I would to put the new label in the same position as the dN label. I attach images to better explain myself.

CopyQ.uJinMG.png

CopyQ.TVtByT.png

Link to comment
Share on other sites

You can use "gom.script.cad.set_label_position" to set the offset of the new label to the offset of the old label

old_label=gom.app.project.inspection['Surface comparison 1'].deviation_label['Surface comparison 1.1']
new_label=gom.app.project.inspection['Surface comparison 1'].deviation_label['Surface comparison 1.2']

gom.script.cad.set_label_position(elements=[new_label],offset=old_label.label_offset_in_3d_view)

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...