Question

DWG - Get Bounding box of text without anchor point

  • 12 February 2020
  • 2 replies
  • 1 view

Hello all,

I'm reading labels from a DWG and trying to determine what line they apply to based on their location relative to the line. As part of this I use the oriented bounding box of the text rather than the anchor point as the text usually has the anchor point below and to the left of the actual text while it is the actual text the user has positioned relative to the line. A BoundingBoxReplacer works well for this. However the bounding box includes the anchor point. See pic:

 

Is it possible to get the bounding box without the anchor point included?

Thanks

Michael Pascoe

cc: @deanhowell


2 replies

Badge +9

Hey @michaelpascoe, if you use the TextStroker, then the BoundingBoxRelpacer, that might give you the result you need but it means knowing what font is used.

Hi @deanhowell​ ,

I just realised I never responded to this. Stroking the text then generating the bounding box worked perfectly.

Thanks

Michael

Reply