Skip to main content
Solved

Missing autocad_alignment_x and y coordinates


Forum|alt.badge.img

I am working with many autocad files and trying to extract data from paper space objects. The objects i am trying to extract are mtext object (of type autocad_multi_text) I am trying to match up objects that start with a specific string to objects just below them. to do this i want to use the autocad alignment_x and y

coordinates. I have enabled the feature type format attributes

needed and do see many of the attributes populated in the visual preview.

but not the ones i need. I can get the coordinates using a coordinate extractor but those are the lower left and will not help me select the adjacent below text that i need.

 

Best answer by daveatsafe

Hi @kidsmake6until2,

MText entities do not have autocad_alignment_x, y, z values, but instead have autocad_box_height and autocad_box_width, which give the dimensions of the MText box. The attribute autocad_attach_point defines the location of the FME text point to box (ie. autocad_middle_center means the box is centered around the text location).

If you set the DWG reader parameter 'Explode MText Entities' to Yes, the MText will be exploded into a separate text feature for each line. These features will have the autocad_alignment_x, y, z values. This might be the most useful option for you.

View original
Did this help you find an answer to your question?

8 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • Best Answer
  • May 20, 2020

Hi @kidsmake6until2,

MText entities do not have autocad_alignment_x, y, z values, but instead have autocad_box_height and autocad_box_width, which give the dimensions of the MText box. The attribute autocad_attach_point defines the location of the FME text point to box (ie. autocad_middle_center means the box is centered around the text location).

If you set the DWG reader parameter 'Explode MText Entities' to Yes, the MText will be exploded into a separate text feature for each line. These features will have the autocad_alignment_x, y, z values. This might be the most useful option for you.


Forum|alt.badge.img
daveatsafe wrote:

Hi @kidsmake6until2,

MText entities do not have autocad_alignment_x, y, z values, but instead have autocad_box_height and autocad_box_width, which give the dimensions of the MText box. The attribute autocad_attach_point defines the location of the FME text point to box (ie. autocad_middle_center means the box is centered around the text location).

If you set the DWG reader parameter 'Explode MText Entities' to Yes, the MText will be exploded into a separate text feature for each line. These features will have the autocad_alignment_x, y, z values. This might be the most useful option for you.

when looking at the fme feature information (and selecting the IFMEPoint) it shows the lower left of the text as the text location point. Also Why? when it is left as mtext (not exploding which i really need to not explode), the mtext string is populated, and also the autocad text string is populated. Why cant the alignment_x be populated/exposed?


Forum|alt.badge.img
daveatsafe wrote:

Hi @kidsmake6until2,

MText entities do not have autocad_alignment_x, y, z values, but instead have autocad_box_height and autocad_box_width, which give the dimensions of the MText box. The attribute autocad_attach_point defines the location of the FME text point to box (ie. autocad_middle_center means the box is centered around the text location).

If you set the DWG reader parameter 'Explode MText Entities' to Yes, the MText will be exploded into a separate text feature for each line. These features will have the autocad_alignment_x, y, z values. This might be the most useful option for you.

there is nothing i can expose to get this middle center


Forum|alt.badge.img
daveatsafe wrote:

Hi @kidsmake6until2,

MText entities do not have autocad_alignment_x, y, z values, but instead have autocad_box_height and autocad_box_width, which give the dimensions of the MText box. The attribute autocad_attach_point defines the location of the FME text point to box (ie. autocad_middle_center means the box is centered around the text location).

If you set the DWG reader parameter 'Explode MText Entities' to Yes, the MText will be exploded into a separate text feature for each line. These features will have the autocad_alignment_x, y, z values. This might be the most useful option for you.

if i did consider exploding the mtext is it possible to have both settings on 1 reader (multiple feature types)? to say have 1 reader and one feature type not explode mtext and another that does?


Forum|alt.badge.img
daveatsafe wrote:

Hi @kidsmake6until2,

MText entities do not have autocad_alignment_x, y, z values, but instead have autocad_box_height and autocad_box_width, which give the dimensions of the MText box. The attribute autocad_attach_point defines the location of the FME text point to box (ie. autocad_middle_center means the box is centered around the text location).

If you set the DWG reader parameter 'Explode MText Entities' to Yes, the MText will be exploded into a separate text feature for each line. These features will have the autocad_alignment_x, y, z values. This might be the most useful option for you.

also I see the attribute attach point for mtext. (bottom center) are we sure there is not a way to expose this as a coordinate?


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • June 15, 2020
gisbradokla_t wrote:

if i did consider exploding the mtext is it possible to have both settings on 1 reader (multiple feature types)? to say have 1 reader and one feature type not explode mtext and another that does?

Hi @gisbradokla,

If you use two readers (one exploding, one not), you should be able to merge the two feature types on the autocad_entity_handle attribute. Alternatively, you could calculate the text position using the box height, width and attach point.


Forum|alt.badge.img
daveatsafe wrote:

Hi @gisbradokla,

If you use two readers (one exploding, one not), you should be able to merge the two feature types on the autocad_entity_handle attribute. Alternatively, you could calculate the text position using the box height, width and attach point.

thank you Dave, I guess then i would have to create a published parameter to use for both of the readers. as they are pointing to a folder of multiple dwgs. Is that how that would be handled (haven't ever accomplished this). The other issue i am tackling is that the mtext has several mtext features that i have to get all of them and put them back together.


Forum|alt.badge.img
daveatsafe wrote:

Hi @gisbradokla,

If you use two readers (one exploding, one not), you should be able to merge the two feature types on the autocad_entity_handle attribute. Alternatively, you could calculate the text position using the box height, width and attach point.

I now have the data coming in as text and have a value in autocad_alignment_x. I am trying to assemble the values that are associated by their drawing name (fme_basename) and the alignment_x value. (the x value is the closest thing i can think of that is common between the items [since they are center aligned]) However, the autocad_alignment_x value is not the center of the text it is the lower left. How do I get back the bottom center alignment?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings