AutoCAD Map 3D General Discussion

Reply
Valued Contributor
larsj
Posts: 73
Registered: ‎06-13-2005
Message 1 of 20 (208 Views)
Accepted Solution

Texts aren't rotated after Map Export DWG to SQLLite

208 Views, 19 Replies
06-12-2012 03:36 AM

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

*Expert Elite*
Alfred.NESWADBA
Posts: 8,887
Registered: ‎06-29-2007
Message 2 of 20 (206 Views)

Re: Texts aren't rotated after Map Export DWG to SQLLite

06-12-2012 03:40 AM 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
-------------------------------------------------------------------------
Valued Contributor
larsj
Posts: 73
Registered: ‎06-13-2005
Message 3 of 20 (202 Views)

Re: Texts aren't rotated after Map Export DWG to SQLLite

06-12-2012 03:58 AM 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?

*Expert Elite*
Alfred.NESWADBA
Posts: 8,887
Registered: ‎06-29-2007
Message 4 of 20 (198 Views)

Re: Texts aren't rotated after Map Export DWG to SQLLite

06-12-2012 04:23 AM 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 :smileywink:

 

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
-------------------------------------------------------------------------
Valued Contributor
larsj
Posts: 73
Registered: ‎06-13-2005
Message 5 of 20 (197 Views)

Re: Texts aren't rotated after Map Export DWG to SQLLite

06-12-2012 04:30 AM 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?

*Expert Elite*
Alfred.NESWADBA
Posts: 8,887
Registered: ‎06-29-2007
Message 6 of 20 (195 Views)

Re: Texts aren't rotated after Map Export DWG to SQLLite

06-12-2012 04:38 AM 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
-------------------------------------------------------------------------
Valued Contributor
larsj
Posts: 73
Registered: ‎06-13-2005
Message 7 of 20 (192 Views)

Re: Texts aren't rotated after Map Export DWG to SQLLite

06-12-2012 04:49 AM 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.

*Expert Elite*
Alfred.NESWADBA
Posts: 8,887
Registered: ‎06-29-2007
Message 8 of 20 (189 Views)

Re: Texts aren't rotated after Map Export DWG to SQLLite

06-12-2012 04:56 AM in reply to: Alfred.NESWADBA

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
-------------------------------------------------------------------------
Valued Contributor
larsj
Posts: 73
Registered: ‎06-13-2005
Message 9 of 20 (185 Views)

Re: Texts aren't rotated after Map Export DWG to SQLLite

06-12-2012 05:09 AM 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... :smileytongue:

*Expert Elite*
Alfred.NESWADBA
Posts: 8,887
Registered: ‎06-29-2007
Message 10 of 20 (183 Views)

Re: Texts aren't rotated after Map Export DWG to SQLLite

06-12-2012 05:12 AM 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
-------------------------------------------------------------------------

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community