AutoCAD Map 3D Forum
Welcome to Autodesk’s AutoCAD Map 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is It Possible to add xdata to Mtext?

8 REPLIES 8
Reply
Message 1 of 9
andras.zelenka
1127 Views, 8 Replies

Is It Possible to add xdata to Mtext?

Hi All!

 

This Idea seems crazy at first, but I would like to add feature properties as xdata to Mtext objects.

 

What am i dooing?

Step by step:

- The (point) spatial data comes from an sqlite file via FDO.The easiest way to create some sample data:

   - Create one closed polyline, then array it, and explode the array to get a lot of closed polylines. Run MapCreateCentroids on the closed polylines to get points.

   - Export these points (centroids) to SDF, SHP or SQLITE, and check some properties field (i checked layer name field only). 

- Create one map layer with these conditions:

   - Define labelling, and use the field 'Layer name'. 

   - Turn off everything on styling. This isn't possible with the Map3D (i don't know why, sometimes i don't need graphic, only the label...), so i need to create the *.layer file to the map layer, edit with notepad (delete the good SimpleSymbolDefinition Tag - must be know the XML frame), remove the layer, close the connection, then reload the modified *.layer file.

- Run MapToAcad to create the dwg, with Editable mode, and include Xdata. After MapToAcad get Mtext without xdata, but i want Mtext with layer names as xdata, and nothing else.

 

Of course, if i don't modify the layer file, the MapToAcad make Mtext from labels, and Blocks from points, and the Blocks get the feature data (layer name) as Xdata. 

 

Any Ideas are Welcome!

 

Regards,

Andras

8 REPLIES 8
Message 2 of 9

Hi,

 

>> Turn off everything on styling. This isn't possible with the Map3D

You can directly set the symbol to be a text (2nd column in the style editor) so you don't need the 4th column (label).

(hope that I understood that correct!)

 

2014-01-28 21-20-15.png

 

 

But for the thing with the XData I must say I don't understand the workflow and the needs. But one thought on that: Map3D has not any function that can handle XData, so whatfor do you need it then? ...or do you mean the Map "ObjectData"?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 9

Hi,

 

if you need text (labels) as elements to export with feature attribute data attached (such as field "layer_name") you could try using a Map annotation layer. You used dynamic labels - they rely on an underlaying feature. The feature therefore gets the attribute data. With annotation layer you create a separate data source specifically for labeling. In DisplayManager click on the "data" button and select "Annotation layer" :

 

http://docs.autodesk.com/MAP/2010/ENU/AutoCAD%20Map%203D%202010%20User%20Documentation/HTML%20Help/f...

 

Tricky bit - transfer your data into a annotation label feature class. It's basically just an SDF file - BulkCopy would be an option.

But I don't know your specific requirements,

 

Good luck,

Rob

 

 

http://raumpatrouille3d.blogspot.ch/
Message 4 of 9
braudpat
in reply to: andras.zelenka

Hello

 

If you want to go from AutoCAD XDATAs to ODs (Object Datas of MAP), you could use the XD2OD.lsp routine !?

 

Bye, Pat

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Message 5 of 9

Thank you Alfred for you reply!

Yes, you understood my question exactly. I didn't know this solution, to disable style of point feature source...i suffered every time with the layer file editing.

 

Why i mentioned Xdata? If i have some Map layer, and save them with Maptoacad, it's possible to enable feature data exporting as Xdata. We have written a lisp routine to create the Object Data from theese Xdata. Unfortunately we are in trouble with the labels and texts, because they dont get Xdata attributes. This is the cause of this question.

 

Thank you for your tips 🙂
Andras

Message 6 of 9

Thank you for your reply, Rob!

 

Never used the Annotation layer, i will try your method. We want to automate our solution, so we can't create temporary files, like SDF or layer.

So i need to run maptoacad on map layers, so that mtexts (these were previously) have feature attributes as xdata. I thnink we need to dig deeper into autolisp to achive our demand.

 

Thanks you everyone for your messages!

Andras

Message 7 of 9
braudpat
in reply to: andras.zelenka

 

Hello from France

 

Sorry for my bad answer, I don't understand exactly your needs !

 

Good Luck, Bye, Pat

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Message 8 of 9
andras.zelenka
in reply to: braudpat

Hello Pat!

I wrote my question down wrong, because i didn't know the Map3D capabilities exactly, our claim, and even my English is poor. Your reply is a good feedback to me, so we need to write lisp routine to create Object data from Xdata, and build in the soultion to our problems.

Thank you for your reply, Pat!
Andras

Message 9 of 9
braudpat
in reply to: andras.zelenka

 

Hello

 

Please find the OLD Autodesk Routine XD2OD.lsp which I am using sometimes !

 

To copy AutoCAD XD Infos to a MAP OD (Object Data) Table and its Fields/Columns ...

 

Good Luck, Bye, Pat

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost