Convert Anno to Shapefile (VBA vs VB.net)

846
4
Jump to solution
03-14-2011 07:19 AM
by Anonymous User
Not applicable
Original User: crortiz

I have some VBA code I have been using to convert annotation to polygon shapes of the text.  I am now trying to convert to VB.net or C# (I have done both) for use in batch processing.  I have successfully converted the application however the fonts scale wrong.  I suspect it has to do with my use of IMapDocument instead of IMxDocument.  The output for both programs as well as the source is attached.  I have been messing with this for a week any help would be appreciated. 

Carlos Ortiz
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable
Original User: crortiz

Here is the code.  I implemented a base command, there is a walk through in the online help.

View solution in original post

0 Kudos
4 Replies
IgorKaruza
New Contributor
Hi!

Have You found a solution for the Scale issue when VBA code is being translated to .Net (VB or C#) ?

VBA code seems to be working fine (http://help.arcgis.com/en/sdk/10.0/vba_desktop/conceptualhelp/index.html#//0001000000r4000000)... but I haven't tried Multi-part Annotations - there seems to be some issues (http://forums.esri.com/thread.asp?c=93&f=993&t=292545)

Br,

Igor Karuza
0 Kudos
by Anonymous User
Not applicable
Original User: crortiz

Hi!

Have You found a solution for the Scale issue when VBA code is being translated to .Net (VB or C#) ?

VBA code seems to be working fine (http://help.arcgis.com/en/sdk/10.0/vba_desktop/conceptualhelp/index.html#//0001000000r4000000)... but I haven't tried Multi-part Annotations - there seems to be some issues (http://forums.esri.com/thread.asp?c=93&f=993&t=292545)

Br,

Igor Karuza


No I didn't, I just created a command button in c# that runs in an active version of Arcmap and run it manually instead of from a command line.

Carlos Ortiz
GIS Analyst/ Programmer/Analyst
Bexar Appraisal District
0 Kudos
IgorKaruza
New Contributor
No I didn't, I just created a command button in c# that runs in an active version of Arcmap and run it manually instead of from a command line.

Carlos Ortiz
GIS Analyst/ Programmer/Analyst
Bexar Appraisal District


So, please correct me if I'm wrong, You have used C# Code for creating dll for upper mentioned conversion, which You have connected to the button in ArcMap (Customize...).
You havent created Extension or AddIn for ArcGIS Desktop, right?

Because the code is executing in the ArcGIS Desktop Environment (ArcMap), You could use IMxDocument instead of IMapDocument which caused You problems.

Would You be so kind and provide C# code, so I could avoid translating VB.Net to C#.Net.

Looking forward to Your answer!

Br,

Igor Karuza
GDi GISDATA d.o.o.
0 Kudos
by Anonymous User
Not applicable
Original User: crortiz

Here is the code.  I implemented a base command, there is a walk through in the online help.
0 Kudos