MapService drawing lost custom element

1153
13
12-04-2012 02:06 AM
lunlee
by
New Contributor
Hi everyone,
    I have a annotation feature layer using a custom element.The custom element is supported by a DLL file.I registered the DLL file by microsoft .net 'regasm' in command line,and ArcMap displays the custom element as I expected.
    So I decided to publish the .mxd file to ArcGIS Server 10.1.When I preview the map,the custom element disappeared.I think it's must be the custom element that causes the problem.Anyone can help me to figure this out?

    lun li.
[ATTACH=CONFIG]19697[/ATTACH]
Tags (2)
0 Kudos
13 Replies
PeterYurkosky1
Occasional Contributor
Can you give us more details? Are any of the following called when you open the Preview window?


  1. Your element's constructor

  2. Your IElement.Activate implementation

  3. Your IElement.Draw implementation

If so, is your code throwing an exception?
0 Kudos
lunlee
by
New Contributor
Can you give us more details? Are any of the following called when you open the Preview window?


  1. Your element's constructor

  2. Your IElement.Activate implementation

  3. Your IElement.Draw implementation

If so, is your code throwing an exception?


hi,peter:
    Thank you for reply!
    I'm afraid I can't give you details about codes.I just only have the DLL file.
    What I can tell by now is that in ArcMap Service Preview Window,the map is drawing from a msd file,which is a different format from mxd file.I guess the msd file may not be able to use the custom element DLL file.
   
    lun li.
0 Kudos
PeterYurkosky1
Occasional Contributor
I see. Can you zip up the .dll and send it to me? Can you also give me a quick tutorial on how I might see the element draw in ArcMap? I'll see why it refuses to draw.
0 Kudos
lunlee
by
New Contributor
I see. Can you zip up the .dll and send it to me? Can you also give me a quick tutorial on how I might see the element draw in ArcMap? I'll see why it refuses to draw.


Hi,peter:

I've sent you a private message with data and file download link.
0 Kudos
PeterYurkosky1
Occasional Contributor
Yes, the .msd (an optimized map document format) does not draw elements (or anything else, including layers) the same way an .mxd does. It's an optimized format that stores objects (maps, layers, symbols) completely differently from the .mxd. The optimized anno layer is silently skipping your elements when it draws in the Preview window. It loads fine, but since it's not an Esri element, we can't convert it to the new format. Nor do we expose some means by which you could do that conversion yourself. And there isn't any way to publish a non-optimized map service to a 10.1 server; we only support the optimized format.
0 Kudos
lunlee
by
New Contributor
Yes, the .msd (an optimized map document format) does not draw elements (or anything else, including layers) the same way an .mxd does. It's an optimized format that stores objects (maps, layers, symbols) completely differently from the .mxd. The optimized anno layer is silently skipping your elements when it draws in the Preview window. It loads fine, but since it's not an Esri element, we can't convert it to the new format. Nor do we expose some means by which you could do that conversion yourself. And there isn't any way to publish a non-optimized map service to a 10.1 server; we only support the optimized format.


Well,This is not a very good news.So, do we have any other ways to let ArcGIS Server 10.1 display these custom element?
Our orgnization need to upgrade ArcGIS Server to 10.1 to benifit from new features . And we have a lot annotation layer using custom element.

Thanks!
lun lee
0 Kudos
PeterYurkosky1
Occasional Contributor
I would write some conversion code to convert your custom element to a group element containing standard text elements (and whatever else you need to draw). If you can draw your anno as a group element in ArcMap, it will draw in a map service.
0 Kudos
lunlee
by
New Contributor
I would write some conversion code to convert your custom element to a group element containing standard text elements (and whatever else you need to draw). If you can draw your anno as a group element in ArcMap, it will draw in a map service.


Hi peter:
I've been busy on other stuff these days.Sorry to reply so late.Would you send me the conversion code?I shall try it out.
Thanks for your help!

lun lee
0 Kudos
PeterYurkosky1
Occasional Contributor
I meant, you should write some code to convert all the separate pieces comprising your custom element, and insert them into a group element. From what I saw of your element, it's nothing more than some line graphics and text.
0 Kudos