Tuesday, 24 November 2015

Map crashes when changing dimension style properties

If you open the Dimension-Style Manager (command: _dimsty) and change a property Map/AutoCAD might crash:


DIMSTY crashes AutoCAD...

On the AutoCAD discussion forum it was mentioned that the problem is related to VBA enabler - which we have installed as well. To work around the issue you can use "Overwrite" instead of "Modify" in DimStyle Manager.

Map 2013, SP2

Tuesday, 17 November 2015

MapGuide/AIMS - WMS: wrong URL in GetCapabilities

I set up some WMS layers on AIMS 2013. In Site Admin I configured server name and script name as required. But in my GetCapabilities document I still got the previous server name and script name (http://localhost:8008/mapagent/mapagent.fcgi). Any wms request therefore didn't work.

Solution: restart IIS service (World Wide Web Publishing Service).

Friday, 30 October 2015

There was a problem adding data to Map

In summer we got raster files for a project and one colleague loaded the files into Map via FDO and worked with the files. Then the project was stopped and has been restarted only recently. But the files could not be added to Map anymore - we only received the message: 

"There was a problem adding data to Map"

Nothing seemed to have changed - we still have Map 2013, the raster files are the same. So why didn't it work anymore?

Autodesk support pointed me to the following KB article:

"AutoCAD Map 3D: Error: "There was a problem adding data to Map" when adding WMS or Rasterfiles"


Issue:

Connect to WMS or Raster files via FDO, the connection work but cannot add the layer to Autodesk® AutoCAD® Map 3D

Causes:

The issue could be related to permission, or lack of them.

Solution:

Open AutoCAD Options menu >Files tab and locate “Temporary External Reference File Location”. This revealed the path where program copies the remporary FDO files.
FDO needs full rights to this location C:\Users\<username>\appdata\local\temp\
Alternatively create folder with full permission at C:\TEMP and set “Temporary External Reference File Location” to that path. 


Funny though as my setting for "“Temporary External Reference File Location”" was already "C:\temp". But then I realised that we applied a new AutoCAD profile to all workstations couple of weeks ago and that the new profile probably has to do with the issue.

I created a new (empty) profile and added the images succesfully to Map. The setting for the Temporary External Reference File Location is now "C:\Users\<<>>\AppData\Local\Temp\" again. When I change it to C:\Temp I cannot add the files anymore.

Conclusion - it works for me but exactly the other way round as described in the KB arcticle. Anyway, as long as it works....

Map 2013, SP2

Edit:
ok, the difference is "full rights". As normal user I do not have full rights on c:\temp and I cannot change that myself. Whereas with C:\Users\<username>\appdata\local\temp\ I have full access. At least in our corporate environment.

Thursday, 22 October 2015

Intersection with guest user


When performing an intersection in Map with a guest user you will receive an error message stating that a specific feature class could not be emptied due to insufficient privileges.

The table in question has been set up with Select, Insert, Update, Delete permissions in the guest user.

Autodesk support explained, that the table content is not deleted but the table is truncated. Therefore the Delete permission on the table is not sufficient.

The following workarounds have been proposed:

- perform intersection in Map-Admin accross whole area 
- perform intersection in data document

One other possibility is to grant "drop any table" to the guest user. But giving the guest user such as privilege might not be a good solution either.

Map 2013 SP2

Wednesday, 2 September 2015

Map - and GIS analysis

There was a posting at CAD.DE regarding a specific task to be accomplished by using Map.

Here is a short description:

A drawing file contains two different sets of point features.

point feature set 1 - blocks, including an ID (block attribute), labelled as "b1"
point feature set 2 - points, including an ID (Map object data table) labelled as "s1"

Here is a screenshot:





The task was to create a list where each point of feature class "s1" is linked to the closest point in feature class "b1".

Several suggestions were made how to solve the issue with Map - but either it involved laborious manual work or wouldn't always return the closest point. One suggestion was to use a spatial database to get the desired result.

I then decided to try whether that would be possible without installing any software and using only freely available tools.

Here is a short description of what I did using SQLite and Spatialite:

(1) export both point data sets (including block attributes and Map object data table) to SQLite using _mapexport


(2) download spatialite_gui.exe (http://www.gaia-gis.it/gaia-sins/index.html) - doesn't require an installation


(3) in spatial_lite connect to SQLite file
        Spatialite recognises the Map/FDO SQLite data model and geometry columns. There are accessible as "virtual tables" meaning that they cannot  be modified. It also seems that you cannot run spatial queries on the virtual tables - at least I didn't work for me. But I'm not experienced with spatial lite and might have just done something wrong.


(4) copy data from virtual tables to normal SQLite tables using CTAS (create table as select)
        With spatialite you need to create a geometry column in a very special way. First you have to create the table, afterwards you add the geometry column using the following statement: SELECT AddGeometryColumn(...). As I created my two tables with CTAS I did not get "proper" geometry columns. But for the task in question it didn't matter. The only drawback I noticed with my approach was that I couldn't export to SHP. This requires proper geometry columns.


(5) looking around I found some SQL statements for SQLite for similar tasks, I tried and played around a bit and found the following statement to return correct results:

SELECT
s1.featid as sn_id, b1.nr as b_nr, min(ST_Distance(s1.geom, b1.geom))  as dist, x(s1.geom) as xgeom , y(s1.geom) as ygeom
FROM b1, s1
group by s1.featid
ORDER BY s1.featid ;

(6) I created a new table using the select statement above


(7) to perform a visual check I wanted to load the result into Map again. As I had modified the SQLite database - by adding tables - Map refused to connect to the file. Anyway - even I had been able to load the file into Map it wouldn't have recognized the spatial_lite geometry column as Map/FDO and spatialite use different structures to store geometries. I therefore exported the table as CSV file.

(8) Now as I thought it would take too long to convert the CSV file into a spatial feature class using Map I just loaded the CSV file into QGIS and exported it as SHP data set which I then connected to in Map.

(9) overlaying the SHP file and the original drawing file I could visually check the correctness of the result.








Construction (Cogo) - no feature class available in "Save options"

When you perfom certain CoGo operations you will be presented with the following dialog box:


Cogo - intersection dialog box


In case the Feature class drop down list beneath "Save options"  is empty or certain feature classes are missing - check that you have choosen a suitable profile in the Industry Model explorer. Only  feature classes included in the active profile will be availabe in the drop down list:
Map - IM Explorer - profiles
Map 2013, SP2

Monday, 10 August 2015

MapGuide Alias - UNC

I just tried to set up an alias for MapGuide / Infrastructure Mapserver 2013. I tried a few different UNC path options (for instance with concluding backslash) but no - it just didn't work. Finally I found my mistake - just the UNC path for the share is not sufficient. I had to add a folder to get it to work.

Does not work:

\\bla.net\fachappli$\MG_DATEN  (>> just the share)

Does work:

\\bla.net\fachappli$\MG_DATEN\Raster (share and subfolder)