Share

AcDbMText::setAttachmentMovingLocation

C++

Acad::ErrorStatus setAttachmentMovingLocation(
    AttachmentPoint
);

Description

This member function changes the attachment of the MTEXT object, just as setAttachment does, however it also moves the location (as per setLocation) in order to keep the current extent unchanged. This differs from setAttachment, which keeps the setLocation constant, thus moving the extent relative to that location.

The AttachmentPoint enumerated type has the following possible values:

  • AttachmentPoint::kTopLeft
  • AttachmentPoint::kTopCenter
  • AttachmentPoint::kTopRight
  • AttachmentPoint::kMiddleLeft
  • AttachmentPoint::kMiddleCenter
  • AttachmentPoint::kMiddleRight
  • AttachmentPoint::kBottomLeft
  • AttachmentPoint::kBottomCenter
  • AttachmentPoint::kBottomRight

Returns Acad::eOk if successful or Acad::eInvalidInput if the data passed in is not acceptable.

Example:

Changing attachment point from Top Left to Bottom Right. (* is attachment Location)

             |
             |
             |
  --+--+--+--*--+--+--+--
             |ABC     :
             |XYZ     :
             |- - - - +

using setAttachment:

   + - - - -|
   :     ABC|
   :     XYZ|
 --+--+--+--*--+--+--+--
            |
            |
            |

using setAttachmentMovingLocation:

             |
             |
             |
  --+--+--+--+--+--+--+--
             |     ABC:
             |     XYZ:
             |- - - - *

Parameters

Parameters Description
unnamed Input desired AttachmentPoint type value

Links

AcDbMText Class

Was this information helpful?