POST
|
Hi, Trevor: Thank you very much for your time. I test the code on a Nexus 6p, with android 8.1, and using the SDK of 100.2.1.
... View more
06-06-2018
07:51 AM
|
0
|
0
|
594
|
POST
|
Thanks for replying, here is the mmpk I used for test.
... View more
06-05-2018
02:49 AM
|
0
|
1
|
594
|
POST
|
Hi: I am trying to load a mmpk contains tpk layer, the loading is successful, except that the tpk layer does not diaplay, I use the sample code to load the mmpk, I use the most recent SDK 100.2.1 mMapPackage = new MobileMapPackage(mmpkFile);
// load the mobile map package asynchronously
mMapPackage.loadAsync();
// add done listener which will invoke when mobile map package has loaded
mMapPackage.addDoneLoadingListener(new Runnable() {
@Override
public void run() {
// check load status and that the mobile map package has maps
if(mMapPackage.getLoadStatus() == LoadStatus.LOADED && mMapPackage.getMaps().size() > 0){
// add the map from the mobile map package to the MapView
mMapView.setMap(mMapPackage.getMaps().get(0));
}else{
// Log an issue if the mobile map package fails to load
Log.e(TAG, mMapPackage.getLoadError().getMessage());
}
}
}); it looks like this, the highway is a vector layer in the mmpk, the .tpk (states layer) is missing. I can load it in the ArcGIS explorer, the result is perfect. it looks like this: Did anyone experience this problem?
... View more
05-25-2018
06:32 AM
|
0
|
5
|
980
|
POST
|
Yes, That could be the reason for the annotation. But the annotation works well when adding the .dwg using the "Add Data" button in ArcMap. Seems the "Add Data" using better mechanism to show the CAD data. That is why we want simulate that process in Code.
... View more
04-13-2016
05:42 PM
|
0
|
0
|
1047
|
POST
|
Thanks for the reply. The CAD files do not have any projection files, it is come from other agency who only use the AutoCAD.
... View more
04-13-2016
06:22 AM
|
0
|
0
|
1047
|
POST
|
I searched the document and find that we can drop the .dwg file from a Catlog window instead of using the "Add Data" button: This method also creates a group layer, can we automate this process by ArcObjects code? Thanks a lot.
... View more
04-12-2016
11:14 PM
|
0
|
2
|
1047
|
POST
|
I guest the best way is to add may be 10-20 .dwg files one time in ArcMap using the Add Data, then save each .dwg group layer to .lyr file using python code; keep doing it until we create a .lyr file for each .dwg file. Thus the .lyr files will have the renderer information of the .dwg files. Finally we can use AO or Python to export PDF using the exist .lyr file, get the right symbol and annotation.
... View more
04-12-2016
10:26 PM
|
0
|
0
|
1047
|
POST
|
One of our customers have thousands of CAD .dwg files. The need an function on the Web that they can provide a .dwg file name, and get an .PDF file. Export to PDF from .mxd or .lyr file is quite easy. The problem is how to make an .mxd or .lyr file from a .dwg file. Of cause I can using ArcMap, add .dwg file using the Add Data Dialog. As I learn from the Desktop Help: "When you add CAD data to a map document, features are drawn to match the CAD drawing's original symbology as closely as possible. The default CAD renderer draws CAD features by unique values combining line type, color, and line weight properties." And I got a map like this, it's pretty good: The problem is we need to automate the process. so we using the flowing code to add the Cad Drawing to the Map: Set pCadDrawingDataset = GetCadDataset("d:\data\cad", "e-51878.dwg") If pCadDrawingDataset Is Nothing Then Exit Sub Set pCadLayer = New CadLayer Set pCadLayer.CadDrawingDataset = pCadDrawingDataset pCadLayer.Name = "e-51878.dwg" pMxDoc.FocusMap.AddLayer pCadLayer It works, but the map looked like this: The line color is OK, but the Annotation is too big compares the the first image, and the whole dwg file becomes one layer. Since it is become one layer, we can not modify the display of the annotation. Of cause we can add the .dwg layer by layer using .dwg:polyline, .dwg:polygon. But this method can not do the automatic symbolization. So my question is : Is it possible to do the "Add Data to Map" by the ArcObjects Code? So that I can get the first map. I know there is a IAddDataDialog, but it will popup an dialog. ArcMap using a special renderer for CAD .dwg file, it is very difficult to do it in Code:
... View more
04-12-2016
07:36 PM
|
0
|
7
|
3764
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|