Hello guys,
Is it possible to export MTEXT alignment (top left, middle center, etc) to a GIS format such as SDF or SHP? I'm able to export MTEXT correctly, but alwaus without the alignment, which is pretty important in my case.
I've tried with FME with limited success. I was able to retrieve text alignment, but each MTEXT carriage return was considered a new feature. That means if I have a 4 line MTEXT, this will create 4 points in a SHP or SDF.
Thanks,
Maxime
Hi Maxime,
I know that if you run a MAPEXPORT and look under the Feature Class tab > Select Attributes, you can find several Object Properties for MTEXT:
Unfortunately I don't see one for alignment, but maybe you can get the results you are looking for by using other parameters, such as the position parameters under Geometry?
And I'm sorry but I do not have any knowledge of FME to share.
Well, I cannot understand this question, sir.
In a Gis environment, a shapefile is only a information carrier, without any "formatting" properties.
If you wanna improve the look of your text shape labels, you can stylize 'em in your Gis client.
For instance, Qgis allows labelling "on mouseover" a whole stack of point attributes.
Antonio,
I know what a SHP is.
You answered your own interrogations in your answer.
What I want to do is export MTEXT into SHP because I want to load them into SQL Server, and the only way I can do this right now is: Export to SHP - COnnect to SHP, Bulk Copy to SQL Server. Since all MTEXTs are not in the same alignment, I wanted to export the value of each alignment, so the anchor point will vary depending on the value.
I'll probably have to do it by hand or create a script that compares MTEXT and SHP at the same location and load the alignment into the SHP column.
Thanks
Maxime
Hi,
here is Lisp code to copy DXFcode 71 (justification) into OD : table=MTextJustif Field=JUSTIF
;===============================================================================; ; Création de la table Handle ; ;===============================================================================; (defun CreateTableHandle ( / tabldefn result ) ;construit la table des parcelles si nécessaire (if (not (member "MTextJustif" (ade_odtablelist))) (progn (setq tabldefn '(("tablename" . "MTextJustif") ("tabledesc" . "MText Justification") ("columns" ;Define a field (("colname" . "JUSTIF") ("coldesc" . "Justification") ("coltype" . "integer") ("defaultval" . 0)) ))) ;Create the new table (setq result (ade_oddefinetab tabldefn)) ) (setq result T) ) result ) ;===============================================================================; ; Copie code 71 en OD ; ;===============================================================================; (defun C:MTextJustifToOD () ;;; Crée la table (CreateTableHandle) ;boucle de sélection d'une polyligne (setq JEU (ssget (list (cons 0 "MTEXT"))) I 0) (repeat (sslength JEU) (setq oMText (ssname JEU I)) (setq I (1+ I)) ;; SI pas d'enregistrement sur cet objet ALORS ajoute l'enregistrement (if (= (ade_odrecordqty oMText "MTextJustif") 0) (if (not (ade_odaddrecord oMText "MTextJustif")) ; SI l'ajout de l'enregistrement s'est mal passé (alert "Pb à l'ajout de l'enregistrement") ) ); Fin test Enregistrement existe ; Met à jour le champ Commune (if (not (ade_odsetfield oMText "MTextJustif" "JUSTIF" 0 (cdr (assoc 71 (entget oMText))))) (alert "Pb : mis à jour du champ Justification impossible") ) ) ) (alert "MTextJustifToOD")
Now you can export this information to SHP
Olivier
Can't find what you're looking for? Ask the community or share your knowledge.