rectangle around annotation text

Next
 From:  pressure (PEER)
11125.1 
I'm trying to draw a rectangle around some text with some padding. I tried the textbox outline = rect at first because that seemed perfect, but there aren't any snaps on the rectangle shape so I can't do very much with it.

I want annotation text specifically so that I can edit it and also so that it gets exported to SVG etc. as filled.

How can I get the bounding box of some annotation text scaled by model units? I tried the command boundingBox and that gives an empty result. I also tried all of the bounding box script methods and properties and get a box of size 0 from all.

Is there something like an optional parameter that I can pass to one of the bounding box script methods to get it to include annotation text?

- Peer
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
11125.2 In reply to 11125.1 
Hi Peer, so for annotations the bounding box methods only consider the annotation's definition points. For an AnnotationText object, that's just one anchor point the same one that you pick in the Dim > Text command, and the same one you see if you turn on edit points. That's why you get a zero size bounding box.

The textbox size can be view dependent and the BoundingBox command and regular retrieval functions are not set up to gather view dependent information. So currently there isn't any way for a script to retrieve that particular information.

I'll add in a .getTextBoxOutline( viewport ) method on annotations that will return 4 points that are the corners of the textbox.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  pressure (PEER)
11125.3 In reply to 11125.2 
Hi Michael,

Thanks for explaining more about how the bounding box methods work and why they work this way for annotation text. I'm looking forward to .getTextBoxOutline( viewport )

- Peer
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All