<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
As DWG is a proprietary format, I belive it will be difficult to do
this with only open-source software.<br>
Supposedly, you can use FME to do it, and I think there is some
organisation that has a 'open-source' like library for reading DWG data.<br>
<br>
There are no methods for dealing with DWG in Maestro or the Maestro
API, for the above reasons.<br>
<br>
As for SHP, it is fairly easy to do this:<br>
<tt>IServerConnection con = new HttpServerConnection(url, username,
password, locale, false);<br>
FeatureSource fs = new FeatureSource();<br>
fs.Provider = "OSGeo.SHP.3.3"; //Adjust if you are not using FDO 3.3<br>
fs.Parameter = new NameValueCollection();<br>
fs.Parameter["DefaultFileLocation"] =
"%MG_DATA_FILE_PATH%ShapeFile.SHP"; //Can use absolute path here<br>
string resId = "Library://MyShpFile.FeatureSource";<br>
con.SaveResourceAs(fs, resId);<br>
using(System.IO.FileStream fs =
System.IO.File.OpenRead("C:\\myshapefile.shp"))<br>
&nbsp;&nbsp;&nbsp; con.SetResourceData(resId, "ShapeFile.SHP", ResourceDataType.File,
fs);</tt><br>
<br>
The above code will create a managed copy of your shape data.<br>
If you want an unmanaged copy, just change "DefaultFileLocation" to the
absolute path, and remove the "SetResourceData" call.<br>
<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
Greenhough, Jamie skrev:
<blockquote
 cite="mid:0FB387BEC450E54795983A68276C727C61975E@SCVANEX5.sierrasys.com"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator" content="Microsoft Word 12 (filtered medium)">
  <style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
  </style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
  <div class="Section1">
  <p class="MsoNormal">Hello again MapGuide coders ;)<o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">I want to programmatically load .dwg/.shp files
to a managed
MapGuide environment. <o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">I think this can be accomplished with the
MapGuide Studio
API&#8230; but are there any other ways to get this data into the MapGuide
server? I&#8217;m trying to stay open source. Are there any methods in the
Maestro API to accomplish this?<o:p></o:p></p>
  </div>
  <p>----Notice Regarding Confidentiality----<br>
This email, including any and all attachments, (this "Email") is
intended only for the party to whom it is addressed and may contain
information that is confidential or privileged. Sierra Systems Group
Inc. and its affiliates accept no responsibility for any loss or damage
suffered by any person resulting from any unauthorized use of or
reliance upon this Email. If you are not the intended recipient, you
are hereby notified that any dissemination, copying or other use of
this Email is prohibited. Please notify us of the error in
communication by return email and destroy all copies of this Email.
Thank you.</p>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
  </pre>
</blockquote>
</body>
</html>