Skip to main content
Solved

How write a DWG (Auto CAD) file with coordinate system?


kushtrim
Contributor
Forum|alt.badge.img+1

I have a DWG file with unknown CS but I know the CS it just needs to be assigned to the DWG. When I set the CS when I read the DWG then it appears in the correct location on the Earth but once I try to write it, it doesnt write the CS info and it appears again in the false location on Earth! I also tried “CoordinateSystemSetter” but with no success. On FME it appears good while transforming but not in the resulting DWG. Any Idea?

Best answer by jovitaatsafe

Hi @kushtrim, in addition to setting the coordinate system in your workspace, can you confirm that you’ve set a coordinate system storage method on the AutoCAD DWG writer?

By default, this parameter is unchecked so you’ll want to go into the Advanced settings and pick a storage method for ‘Coordinate System Storage’:

 

There are a few more details in our DWG Writer documentation here on what these options do.

View original
Did this help you find an answer to your question?

9 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

How did you check if it worked? In AutoCad? When using the CoordinateSystemSetter, the actual coordinates do not change.


kushtrim
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • March 22, 2024

I inspected it directly in FME in the resulting dwg which still has missing CS and it appears middle in the ocean. With the  CoordinateSystemSetter I am trying only to set the missing CS and at this point data looks good only when writing it doesnt keep this attribute of the CS.


kailinatsafe
Safer
Forum|alt.badge.img+21

Hello @kushtrim, thanks for posting! Are you able to share the version/build of FME Form being used? When you view the cache of the CoordinateSystemSetter in the workspace, is data in the correct location? 

Have you tried using one of the reprojector transformers (eg. CSMapReprojector) instead of a CoordinateSystemSetter, and have FME Form try and guess the source coordinate system? 

Alternatively, what if we try removing the source coordinate system with a CoordinateSystemRemover, before setting it? 

Please let me know if any of these suggestions work for you, or if we still are unable to write data to a coordinate system. Happy to help, Kailin.


kushtrim
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • March 26, 2024

Hello @kailinatsafe thank you for the answer. I am using “FME(R) 2023.2.1.0 (20240104 - Build 23774 - WIN64)”.

The cache of the CoordinateSystemSetter looks good and in the correct location.

I tried  CSMapReprojector and “EsriReprojector” but without success.

I didnt try “CoordinateSystemRemover” because there is no CS at all! When I insert my data it comes automatically “unknown” for the CS.


kailinatsafe
Safer
Forum|alt.badge.img+21

Hello @kushtrim, would you mind testing one more thing please? I wonder if we need to use multiple transformers to sequentially assign a CS. First, use the CoordinateSystemSetter to give the dataset a reference to the desired coordinate system, and then use a CSMapReprojector after to actually apply the projection. 

So, to summarize, set the CoordinateSystemSetter and the CSMapReprojector to your target coordinate system, and then write out the data. Please feel free to reach out again if this does not resolve the issue! Kailin. 


jovitaatsafe
Safer
Forum|alt.badge.img+11
  • Safer
  • Best Answer
  • March 28, 2024

Hi @kushtrim, in addition to setting the coordinate system in your workspace, can you confirm that you’ve set a coordinate system storage method on the AutoCAD DWG writer?

By default, this parameter is unchecked so you’ll want to go into the Advanced settings and pick a storage method for ‘Coordinate System Storage’:

 

There are a few more details in our DWG Writer documentation here on what these options do.


kushtrim
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • April 3, 2024

Hello @jovitaatsafe this parameter did the job “Coordinate System Storage”. Thank you very much for your response.


nielsgerrits
VIP
Forum|alt.badge.img+54

Learned something new today :) thanks!


kushtrim
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • April 3, 2024
kailinatsafe wrote:

Hello @kushtrim, would you mind testing one more thing please? I wonder if we need to use multiple transformers to sequentially assign a CS. First, use the CoordinateSystemSetter to give the dataset a reference to the desired coordinate system, and then use a CSMapReprojector after to actually apply the projection. 

So, to summarize, set the CoordinateSystemSetter and the CSMapReprojector to your target coordinate system, and then write out the data. Please feel free to reach out again if this does not resolve the issue! Kailin. 

Hello @kailinatsafe in addition to this, there is one more parameter needed to be set in the DWG Writer as @jovitaatsafe mentioned on her response. I somehow missed this “detail”! Thank you very much for your response.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings