Select to view content in your preferred language

Is it possible to add ROTATION to the esri_label_generate AutoLISP command?

466
3
11-01-2023 03:52 PM
HenryHart
New Contributor II

The esri_label_generate command is great, however it lacks a ROTATION parameter as input.

In the CAD world, rotation parameters are imperative to objects, especially text objects, as the labels often needs to align with the associated data.

 

For example, I have a gas point dataset that has the text information as attributes.

HenryHart_0-1698878795425.png

 

The text_angle is a default parameter that is maintained with text objects exported out of AutoCAD, along with size and text contents.

 

Right now, my current work around is:

Import point feature layer to AutoCAD using the A4A plugin
Select the point feature layer
For each point in the feature layer
     a. Grab the entity name & x/y coordinates
     b. esri_attributes_get(entity name) returns: textString, textSize, textAngle
     c. ACAD Command: (_MTEXT xCoord, yCoord, textSize, textAngle, textString)

 

This works, but grabbing each objects information and inserting a MTEXT object at that point one at a time is very time consuming. 

 

Are there any plans for future versions to include the rotation as a parameter?

 

3 Comments
DanWade
Status changed to: Under Consideration

Hello Henry, We actually take advantage of a Rotation or Angle field for blocks from the attribute field so the blocks are automatically rotated based on the double data type within the field.

Doing the same thing for labels is an interesting idea. If the feature you are labeling has a rotation value then we can apply that to the label. I have set this to "Under Consideration."

HenryHart

Hi Dan,

 

Thanks for the response, glad to see it is under consideration.

 

Also, regarding your comment about the blocks, is this implemented when using Apply Symbol? Or what command auto rotates the blocks? 

 

Henry

DanWade

Hey Henry,

Yes, the rotation and angle field is automatically applied through the use of apply symbol. The documentation page is here.