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: 

Texts aren't rotated after Map Export DWG to SQLLite

19 REPLIES 19
SOLVED
Reply
Message 1 of 20
larsj
740 Views, 19 Replies

Texts aren't rotated after Map Export DWG to SQLLite

Hello,

 

I wan't to export a DWG-file with texts to a sqllite database to be used i MapGuide. The export is successfull but I can't get the rotation of texts to work properly - all the texts are horizontally aligned and not rotated. For example, the ROTATION field of a text in the sqllite database has the value 4.8376865658545531 - in the DWG the rotation property is 192.0233g - but when using the ROTATION field as the value for Rotation in the style label it isn't being rotated. Am I doing something wrong?

 

Regards

Lars Jensen

19 REPLIES 19
Message 2 of 20
Alfred.NESWADBA
in reply to: larsj

Hi,

 

IMHO the ROTATION-value is measured in radiant (based on PI) and not degrees.

So you can make a function like

 

ROT_DEGREE = ROT_RADIANT / PI * 180

 

HTH, - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 20
larsj
in reply to: larsj

So when I export from a DWG to sqllite it converts radiants to degrees and that I need to convert the value in the sqllite database? If so, do you know why it converts the value?

Message 4 of 20
Alfred.NESWADBA
in reply to: larsj

Hi,

 

>> If so, do you know why it converts the value?

The strongly correct answer is: because Autodesk did it this way 😉

 

The answer (I think) is that it has to be one default or there must be any config-files parallel to the SQLite-export that gives the information of what angle-units you are using, what angle is the north-direction and so on.

So it's done easy, no config-files and just one default.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 5 of 20
larsj
in reply to: Alfred.NESWADBA

Ok, but I don't really understand how 192.0233g can be converted to the value 4.8376865658545531. Any idea?

Message 6 of 20
Alfred.NESWADBA
in reply to: larsj

Hi,

 

4 question, then I start to think about what your settings may be:

  • what is your UNITS-setting in your DWG?
  • how is your north-direction set in the DWG?
  • what is your position angle-direction? Clockwise or counterclockwise?
  • are you sure that you measured your object while WCS was active (and not any UCS/UserCoordianteSystem)

Or use this alternative: copy the drawing erase all but this one text-object and upload this new drawing.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 7 of 20
larsj
in reply to: Alfred.NESWADBA

Units = Meters

Northdirection = 100.0000g

Angle = Grads (type) and clockwise

I'm not sure what you mean. I haven't measured any objects but there is a coordinate system specified in the drawing. Could that have something to do with it? The drawing was sent to me, I haven't produced it myself.

Message 8 of 20

Hi,

 

you are working 100° based (don't know how it's called in english, in German it's "Neugrad")

and you have your system rotated to another 0-direction then the export does

and you have another positive angle direction.

 

Look to this sketch:

 

 

 

HTH, - alfred -

 

[EDIT] Sorry answers crossed, I have not seen that you already answered before [/EDIT]

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 9 of 20
larsj
in reply to: Alfred.NESWADBA

I think I understand the problem, but I don't know how to fix it. I tried changing the northdirection to 0 and changing units (in format-> units) from Grads to Decimal Degrees but I still get the same result in the sqllite database. That makes me believe that perhaps I don't understand the problem as I thought... 😛

Message 10 of 20
Alfred.NESWADBA
in reply to: larsj

Hi,

 

You have to:

  • change your angular untis to "RADIANT"
  • your 0-direction has to point to east
  • your angular direction has to be counter-clockwise

....that brings you to the same settings in AutoCAD like the exporter does (hope so, have not tried it at the moment).

Hope now that makes it more clear!

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 11 of 20
larsj
in reply to: Alfred.NESWADBA

Now the value is the same, both in the DWG and the sqllite database, but when I connect to the database and use the rotation value it seems that it interprets it as degrees even though I have the correct units etc in the drawing. I'm stumped. I've attached the DWG in question, if you have time it would be great to hear if you get some other result...

 

 

Message 12 of 20
Alfred.NESWADBA
in reply to: larsj

Hi,

 

what AutoCAD-Map3D version do you use? Just ot make the tests with the same release and you will then be able to use my data.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 13 of 20
larsj
in reply to: Alfred.NESWADBA

Autocad Map 3D 2011 product version E.208.0.0.

Message 14 of 20
Alfred.NESWADBA
in reply to: larsj

Hi,

 

sorry, most of the time I spent was to reduce the video to the max-upload-limit of 1.5MB (I love it 😞 ). I hope the quality is enough to recognize what I typed.

Try to reproduce what I did (within your drawing).

 

HTH, - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 15 of 20
Alfred.NESWADBA
in reply to: larsj

Hi,

 

and additionally the data I created (just the text-objects, no MTEXT).

I had save all (DWG and SQLite-file) in C:\TEMP

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 16 of 20
larsj
in reply to: Alfred.NESWADBA

You've done a hell of a job, thanks for putting in so much effort!

 

I noticed that you where able to choose text on the map export form but I don't have those options on top. I have attached a picture of my form.

 

I'll use this video and/or your export if I can't get it to work myself. Thanks!

Message 17 of 20
larsj
in reply to: Alfred.NESWADBA

And one final thing. Have you tried connecting to the database from a new drawing, adding the texts to the map via a style? I did that with your database and got the same phenomenon - the texts aren't rotated properly... :S

 

I'm starting to think that I'm a dumbass. 😛

Message 18 of 20
Alfred.NESWADBA
in reply to: larsj

Hi,

 

>> I noticed that you where able to choose text on the map export form but I don't have those options on top

I have modified the MAPEXPORT.INI file in th section of SQLite (in orange the changed part), so you get the object-types also available to chose.

 

   [FDO_SQLITE]
   File=True
   Rootname=False
   EntTypes=Types
   FeatureClass=Single
   CreateClassBy=None
   SupportsAppend=False

 

Search through your workstation through all folder (also through hidden ones) for a file called MAPEXPORT.INI and modify that option. Restart Map3D then.

 

>> Have you tried connecting to the database from a new drawing, adding the texts to the map via a style?

May be I don't understand you correctly ... have you modified the style also in the new drawing with the formula for rotation

TXT_ANGLE / 3.14159 * 180

???

If you opened my drawing (drawing and db-file placed in C:\TEMP) do you see the rotation then or not?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 19 of 20
larsj
in reply to: Alfred.NESWADBA

I forgot the formula! Now it works perfectly. I think I exported it correctly, all I was missing was the formula in the style. I've learned alot, thanks!

Message 20 of 20
Alfred.NESWADBA
in reply to: larsj

You're welcome! - alfred -

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

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

Post to forums  

Autodesk Design & Make Report

”Boost