.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Saving FDO layer to DWG file by Custom C# coding..

1 REPLY 1
Reply
Message 1 of 2
rajeev_j
1036 Views, 1 Reply

Saving FDO layer to DWG file by Custom C# coding..

Hi ,

 

Currently I am working on a project which required to convert the FDO layer to DWG file through custom coding
( C# ) . Please can anyone help me with some custom code.It's urgent..

 

Thanks in Advanced,

Rajeev.

 

Addition Information :

 

I am using FDO for fetching oracle spatial data which is displaying as a layer in AUD modal space.This layer I need to save as DWG file through Custom coding ( C#).

 

1 REPLY 1
Message 2 of 2
norman.yuan
in reply to: rajeev_j

Your question is more suiatble to be posted in "AutoCAD Map 3D Develoer" forum (although there isn't many activities).

 

Anyways, here is my thought.

 

With AutoCAD Map (or Civil), you can connect Acad Map to supported FDO source and grab FDO data into Acad Map as Map layers. You can also use AutoCAD Map built-in command to convert an AutoCAD entity into map feature graphic shape, which can be saved back to the FDO source. Acad Map also provides an exporting command to convert all map feature graphic shapes in a drawing to native AutoCAD entities.

 

Unfortunately, the AutoCAD Map ObjectARX .NET API and Map Paltform API do not provide an API to do the conversion between map feature object and Acad entity inside AutoCAD, as far as I know. I believe this is on the requested AutoCAD Map wish list for long time.

 

As I can see, you have 2 choices:

 

You can programmatically (via Map Platform API) connect AutoCAD Map to the FDO source and get the desired FDO feature created in AutoCAD Map as map layers, then you can use Documment.SendStringToExecute to run command "mapexportcurrentmaptodwg".

 

Or you can use FDO library directly talking to your FDO source and get the needed geometries and use your own code to convert them as AutoCAD entity.

 

Depending on the FDO source, the conversion of spatial geometry in FDO source to AutoCAD entity may not be ttat straightforward. For example, if the spatial database for the FDO source is SQL Server 2008, it does not support Circle shape. Instead, it uses a polygon with many vertices to closely representing a circle, which SQL Server 2012 as spatial DB supports Circle shape...Also, the the FDO feature's polygon has curved segaments, the code to create an equivalent of AutoCAD entity would be quite complicated.

 

Maybe, another possible option would be to hold your breath and hope next AutoCAD Map will come with API for converting between map layer feature objects and AutoCAD entitiesSmiley Sad

 

Norman Yuan

Drive CAD With Code

EESignature

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost