Since Bentley Map has no !! way to transfer the XFM data in an ordinary database, I had to write me a VBA application.
The VBA Macro creates a database attachement with the XFM Feature data. The the XFM block should be deleted.
In the MAP Help I havn't found any command to resolve this.
...........
Set oDatabaseLink = Application.CreateDatabaseLink(glMslinkOld, gnEntityNum, msdDatabaseLinkageOdbc, False, 0)
If oElement.IsGraphical ThenoElement.AddDatabaseLink oDatabaseLink??? remove XFM ????oElement.RewritegnCount = gnCount + 1
......
Hi GRJ,
I have no simple answer for your (sorry), but I'd like to ask what exactly do you want to achieve if talking about "no !! way to transfer the XFM data in an ordinary database"? Do you want to:
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Hi Josef,
so the complete workflow is:
Is it correct?
Hi Jan,
I use Bentley Map only for import SHP Files, no XFM project.
Command:
>File >Import >Gis Data Types >Imports >New Import >Add File >Import
Josef
Attached my MVBA script.
dbXFM2DB.mvba
I have had not enough time to check your code (but for the first sight it looks not bad, even if talking about its structure). I did some quick testing and in my opinion this code should work:
Dim ftEnum As FeatureEnumerator Set ftEnum = locateOp.GetLocatedFeatures Do While ftEnum.MoveNext Dim currentFeature As feature Set currentFeature = ftEnum.Current Dim pureElement As element Set pureElement = xft.FeatureMgr.RemoveFeatureLinkages(currentFeature.Geometry) 'Do whatever you need with the new element pureElement.Level = ActiveDesignFile.Levels.Find("Default") pureElement.Rewrite Loop
I guess you should add it to your process feature class to OnFinished method.