Tuesday, 22 July 2014

Map cache

For certain FDO data sources (such as Oracle) Map caches data locally. The cache folder is set in Map-options (command: _mapoptions, tab "System").

Whenever you suddenly get strange error messages in Map related to FDO data and the issue is not reproducible on a different machine a first measure is to empty the Map-cache folder.

Unfortunately the button "Empty cache" in Map-options does not delete all files. Therefore you need to delete the files using  Windows Explorer.

Map 2013 SP2

Sunday, 20 July 2014

Remove TB2 entities from drawing

Here is a little c# application which deletes TB2 entities from a drawing.
We have one project where TB2 saves drawings containing TB2 entities. Moving to Map we need to remove these entities but keep all non-TB2 drawing objects.

The application:
- checks whether a drawing entity has XDATA or not, if there is any XDATA the app checks whether XDATA contains the string "FID:", if so, the object gets deleted
- purges all layers
- creates one new layer (fixed name)
- removes non-TB2 objects on one specific layer (fixed name)
- creates a log file and lists all drawings which could not be processed

The app runs within AutoCAD, you only need to specify the folder where the files are stored (
netload, command: win_deletetb2entities).

Source code is attached as well. Maybe it is useful for someone else.


https://drive.google.com/file/d/0B-MpwgWFuw57aV9IMTViYXdkM0E/edit?usp=sharing


AutoCAD Map 2013, SP2

Friday, 18 July 2014

MapGuide - An exception occurred in DB XML component

When publishing from Map to MapGuide(AIMS) I occasionally receive the following error message

PUBLIZIEREN ABGEBROCHEN:
- Remote-Server konnte den XML-Stream nicht analysieren!

(Publishing aborted - remote server couldn't analyse xml-stream)


This happens if my display model contains lots of layers (let's say more than 30).

In MapGuide Studio I occasionally receive the following error message:





Error message in Studio

An exception occurred in DB XML component.
Error: Not enough space.


or similar error messages referring to the DB XML component.

This happens if I try to delete lots of resources (layers) at the same time.

Autodesk Support provided the following workaround:

- change the following settings in serverconfig.ini temporarily to:

DBMaxLockers = 5000
DBMaxTransactions = 5000

- restart MapGuide
- publish Display Model or delete resources
- set the aforementioned settings back to previous values
- restart MapGuide

AIMS 2013



Map Oracle industry model - Mapsys/Mapmain password

The ordinary Map user needs to know the password of the mapsys or mapmain user in order to connect to Oracle:



Map - Log in dialog box for Industry Models
We are not able to log in using the mapmain user - Map just gives us an error message back. So we need to let users connect via mapsys. Mapsys is a quite powerful Oracle user - we don't want to give username and password to a normal (Map) user (even if it were the mapmain user).

Additionally we have two databases - a production one and a test one. Users need to be able to connect to either of them. Here is how we do it without handing over the passwords:

Map - username and connection details for the login dialog box (command: _mapdbconnect) are stored locally. All details are saved in an XML file. Connection details comprises Oracle database name, mapsys/mapmain user name and password (encrypted).

We have created two xml files - one with the details required to connect to the production database, the other one with the details required to connect to the test database.

There are two desktop shortcuts to fire up Map. A script copies the machting xml file from the network drive to the local folder before Map gets started:

copy SYSTEM.config.mapsys.proddb "C:\ProgramData\Autodesk\AutoCAD Map 3D 2013\R19.0\deu\Settings\SYSTEM.config"
cd /D "C:\Program Files\Autodesk\AutoCAD Map 3D 2013\UserDataCache\"
start "" "C:\Program Files\Autodesk\AutoCAD Map 3D 2013\acad.exe"  /product ACAD /language "de-DE"
exit


The Map user finds all the details for the Login-dialog box filled in already - all he or she needs to do is to enter the personal password. For the user the process is transparent.


Map 2013, SP2


Friday, 11 July 2014

DWG - Export - somes hatches appear as SOLID

When exporting to DWG some hatches are displayed as SOLID hatch. First I thought the export process is to blame or its due to the known issue with hatches and large coordinate values.

same hatch - different appearance

The funny thing was, that the properties of the hatch looked good - it got the right hatch pattern and scale assigned - but nonetheless appeared as "solid". Increasing the hatch scale helped to display the hatch correctly - but I didn't want to change the hatch scale.

It turns out that setting the AutoCAD variable HPMAXLINES to 10'000'000 solves the display issue.


increasing hpmaxlines solves the display issue




Map 2013, Sp2

Friday, 27 June 2014

Security Admin - tables of wrong schema are displayed

I don't know how many people actually make use of Map's Security Admin but it seems there aren't many. Some basic information about Security Admin can be found here We have seen a couple of issues I want to document here for reference:

(a) some functionality is broken when using a Guest
We found out that some features in Map are broken when using a guest instead of the main data document (such as soft split/hard split not working properly anmyore, wrong form opens up for selected feature). Fortunately Autodesk has fixed that (for Map 2013 in form of hot-fixes).

(b) performance issue when creating a guest
That seems to be depending on the Oracle version in use. There is a workaorund (see here).  Unfortunately the SQL profile suddenly stopped haveing any effect in our database and the re-creation of a new profile has not yet solved the issue. But hey, it worked very well for almost 2 months. Some discussion is going on here.

(c) tables of wrong schema are displayed

When you open your guest user in Security Admin you might be surprised to see a completely wrong set of tables. In fact Security Admin shows the tables and views of different Oracle schema - not the one you have created the guest role for.
This will happen if your base schema (main document) contains synonyms. Security Admin displays the tables/views of the schema where the synonyms are pointing to. The only way to work around this - as far as we know - is to create PUBLIC synonyms instead of "normal" private ones.



Map 2013, SP2 (and a few hot-fixes)



Saturday, 21 June 2014

MapGuide fusion viewer - "The specified object was not found."

I just tried to select a feature in MapGuide Studio's "Map Preview" and got the following error message:

"The specified object was not found."

I hadn't seen the message before nor did it occur in any of the other maps.

I did a bit of research and came accross and older positing in MapGuide OS discussion list.


I checked whether I had the same situtaion here or not - by opening the xml definition of the layer file in Maestro. The order of the PropertyMappings seemed to be ok but I then noticed that there was one property mapping in upper and lower cases whereas all other PropertyMappings were in upper cases:

invalid property mapping in layer file?

It turned out that this property didn't occur in the featue table at all. After removing the mapping the message went away. It seems to effect fusion viewer only.

AIMS 2013 SP2,