Fill in block attributes with attribute table fields of the enclosing polyline

Fill in block attributes with attribute table fields of the enclosing polyline

a.collignon
Contributor Contributor
393 Views
3 Replies
Message 1 of 4

Fill in block attributes with attribute table fields of the enclosing polyline

a.collignon
Contributor
Contributor

Hello,

 

Is there a way to assign table values linked to a closed polyline to block attributes located inside that polyline?

The block contains the same fields as in the attribute table.

acollignon_0-1739441940678.png

I know how to do the opposite : assign table values to an object, based on the contain of block inside closed polylines, with the command :_adegenlink.

acollignon_1-1739442084890.png

 

Cf this post : https://forums.autodesk.com/t5/autocad-map-3d-forum/autocad-map3d-mettre-du-texte-en-attribut-de-lig...

 

Do you think my request is possible ?

 

 

 

0 Likes
394 Views
3 Replies
Replies (3)
Message 2 of 4

ChicagoLooper
Mentor
Mentor

Hi @a.collignon 

If you have a closed polyline with object data (OD), you harvest the OD and insert the OD into an attributed block.

 

This block should be a Point block, not a block with a geometric shape. You decide how much OD will be contained in the block. All the OD or just a portion, it's up to you. 

 

<<NOTE: If you want a geometric shaped block instead of a Point block, then you're better off creating and using a shapefile (a polygonal feature class). Shapefile is a more appropriate workflow compared to using an AutoCAD point block.>>

 

Do this:

  1. Using your existing linework and OD, use MAPEXPORT to create a shapefile. Use the polyline's OD to create the shapefile's database file (DBF).
  2. Next, use MAPIMPORT command to import the newly shapefile.
  3. During MapImport, you can insert an attributed block at the closed polyline's centroid AND populate that block's attributes from the shapefile's DBF.

You can edit an individual block's attribute in the Properties Palette block insertion. If you want a fast and understandable way to resolve your issue, share your drawing so more detailed instructions can be provided.

 

Chicagolooper

EESignature

0 Likes
Message 3 of 4

O_Eckmann
Mentor
Mentor

Hi,

 

You can use Annotation Template to create a block with attribute and fill these attributes from any property on polyline (including OD and CAD properties). By default your block in inserted in centroid of polyline, except if you have stored the label point during adegenlink process.

 

If you already have your block inserted in your drawing, it's a bit more difficult. Tell me if I need to explain this solution, which is not native to my knowledge.

 

Olivier Eckmann

EESignature

Message 4 of 4

a.collignon
Contributor
Contributor

@O_Eckmann 

@ChicagoLooper 

Thanks a lot for your answers. 

I didn't really manage to apply your answers, but the initial request has since evolved and I was then able to cope differently with the tools I already knew.

0 Likes