POST
|
The only other suggestion I can think of is changing MyPersistentData's Point variable to an ESRI.ArcGIS.Geometry.IPoint instead of PointClass. If that doesn't work, then I'm afraid we've ventured deeper into ArcObjects than I've ever gone. Do you need to have one of their COM objects inside the class you're trying to persist or is this simply to get their sample code up and running?
... View more
08-12-2016
06:42 AM
|
0
|
1
|
470
|
POST
|
Hmm... I followed your link but it looks to me like it wants a ref. It would give you a compiler error if your code isn't using the correct one. Speaking of which, is that a compiler error you're getting or a runtime exception? You said you've "also tried not new'ing". Did you try including the new like I had in my first comment?
... View more
08-11-2016
12:37 PM
|
0
|
3
|
470
|
POST
|
I'm a little confused by the error message you're getting, but my guess is that it's because the second parameter to Load is a ref parameter, not an out parameter. Try new'ing up the _data member: protected override void OnLoad(Stream inStrm)
{
_data = new MyPersistentData();
_data.Location = "";
_data.Point = new ESRI.ArcGIS.Geometry.PointClass();
PersistHelper.Load < MyPersistentData > (inStrm, ref _data);
} If it were an out parameter, then Load would initialize the object instead of you doing it in OnLoad. BTW, the problem could be something completely different given the bit about "managed activation". What specific line is the error from? The call to Load or setting Location or Point?
... View more
08-11-2016
11:18 AM
|
0
|
5
|
470
|
POST
|
Hi, I'm trying to create a marker from a bitmap, which can be done with SymbolFactory.ConstructMarkerFromFileAsync(). Is there a way to do the same thing with an in-memory bitmap instead of a file? Either a Stream or a System.Drawing.Bitmap object would be fine. For now I'm just writing the image to a temporary file and reading it from there, but that's just kind of dirty and hackish in my opinion. A minor detail, I know, but it irritates me when SDKs operate on files instead of streams!
... View more
06-09-2016
08:13 AM
|
0
|
2
|
2668
|
POST
|
Thanks Dan! The one from 10.3 is 7.83 megs. Different indeed! I think Esri packaged up the wrong .lib in the sample. Do you know if there's anywhere else to download the driver?
... View more
05-27-2016
11:04 AM
|
0
|
1
|
627
|
POST
|
I'm having trouble getting our custom GDAL driver to work in ArcMap 10.4. It works fine in 10.3 and below. In 10.4, ArcMap is calling the dll's entry point when it starts up. Our code is then calling GDALDriverManager’s RegisterDriver function for several file types. That's returning a valid index each time, and calling GDALGetDriverByName seems to work as well. Everything appears to be okay, but then ArcMap never calls the drivers we've registered when the time comes to actually use it. Pretty weird, right? Well here's another weird thing - the gdal_i.lib files from both of these links are identical. 10.3: http://www.arcgis.com/home/item.html?id=44e9c39d342d4b5c8225e3c535a7eec1 10.4: http://www.arcgis.com/home/item.html?id=9a1de2cfeced4f21956342ae91ef89e3 The page for the 10.4 sample makes it sound like despite the version number still being 1.8, the libraries are actually different. Given that, I'd expect the two versions of gdal_i.lib to be different. Am I missing something? Has anyone made their own GDAL driver for ArcMap 10.4?
... View more
05-27-2016
07:37 AM
|
1
|
4
|
4316
|
POST
|
Deidre, I don't recall there being any special tricks other than /s, but here are a few things that I might be doing differently than you: I've got ESRISignAddIn.exe checked in to source control, so it winds up being executed from a location within my job's workspace. ESRISignAddIn.exe is invoked from a batch file. The batch file is executed by a Jenkins batch command step, rather than the .exe being called directly. I'm specifying the /r parameter in addition to /c, /p, and /s. I see you don't have /r in your example above. If it's helpful, here's the batch file that I use: @echo off
REM Print some help if the user is clueless.
if "%~1"=="" (
echo Usage: esriSignAddIn.bat ^<input.esriaddin^> ^<output.esriaddin^> [password] [certificate]
goto :eof
)
REM Prompt for password
cls
echo Signing %1
echo.
if "%~3"=="" (
set /p password="Password: "
) else (
set password=%3
)
REM Clear the displayed password
cls
echo Signing %1
echo.
echo Password:
echo.
REM Set up the certificate path
set thisDirectory=%~dp0%
if "%~4"=="" (
set certificatePath=%thisDirectory%certificate.pfx
) else (
set certificatePath=%4
)
REM Sign the binary
set ESRISignAddInExe=%thisDirectory%ESRISignAddIn.exe
%ESRISignAddInExe% %1 /r:%2 /c:"%certificatePath%" /p:%password% /s Good luck! Let me know if you get it working!
... View more
04-18-2016
11:03 AM
|
2
|
2
|
646
|
POST
|
I don't know why I didn't think to do this earlier, but I just searched through all of the widgets included with Web AppBuilder. I only found one widget that requires dojo/domReady!, so I'm guessing it's not needed anywhere. I also didn't find anything using ready() or manually invoking the parser. I guess the framework must take care of everything and widget authors don't need to worry about it!
... View more
10-09-2015
07:17 AM
|
1
|
0
|
448
|
POST
|
This is sort of a cross-post of this Stack Overflow question, but I'd like to see if anyone has any Esri-centric thoughts on it. I'm confused about whether or not I need to require dojo/domReady! anywhere within a custom widget. Given that Web AppBuilder will have set up the DOM before my widget is loaded, my guess is it will always just return immediately, but I could be overlooking something. Someone on SO suggested that calling ready() instead of requiring the dojo/domReady! plugin might be the correct thing to do. Does anyone know what the best approach is for Web AppBuilder widgets?
... View more
10-07-2015
07:35 AM
|
1
|
1
|
2622
|
POST
|
Thanks Joel! I ended up just using one of the system cursors instead of a custom one, but I'll try changing the format like you suggested if I get a chance one of these days.
... View more
10-07-2015
07:12 AM
|
0
|
0
|
596
|
POST
|
Mike, I don't have any real working code. I've used the proxy technique I described above against .NET framework code, but I've never actually done it for the Pro SDK. I've only been working with their JavaScript API lately, so our .NET code is just sitting around without any unit tests. Very sad indeed! I'm kind of surprised that R# won't extract the interface for you, but it's pretty easy to do manually. Just take the function you need to call, add it to an interface, and follow the pattern above to create a proxy class that calls the real implementation. I recommend only extracting the functions that you actually need, not the entire thing. It's usually not too difficult (although it can get complicated in certain situations), but it's just busy work and more code to maintain. -Mark
... View more
10-03-2015
08:01 PM
|
0
|
0
|
1907
|
POST
|
Fridjof, Thanks for expanding on that example! I'm not sure what framework you're using, but I completely agree with you about how that sort of thing offers too much flexibility. I considered using Microsoft's one at some point just because I was trying to introduce tests in a large, poorly written legacy codebase, but in the end I decided it was best to just refactor bits and pieces and add tests where I could. I've thought about writing a proxy generator like you mentioned, but unfortunately haven't had the time. A code generator could work, but I also wonder if you could employ some DLR black magic. That would be a fun experiment some day if I find the time. -Mark
... View more
10-03-2015
07:50 PM
|
0
|
1
|
1907
|
POST
|
I'm developing a custom widget for Web AppBuilder 1.2 and I'm using the setMapCursor() function to display a custom mouse cursor. It works perfectly in Chrome and Firefox, but unfortunately it's not doing anything in IE 9, IE 11, or Edge. The code looks like this: var COMPASS_CURSOR = 'url(widgets/test/css/images/compass_cursor.png), auto';
var DEFAULT_CURSOR = 'auto';
return declare([BaseWidget, WidgetsInTemplateMixin], {
// Lots of stuff here...
updateMapCursor: function () {
if (this.isSelectLocationToolEnabled()) {
this.map.setMapCursor(COMPASS_CURSOR);
} else {
this.map.setMapCursor(DEFAULT_CURSOR);
}
} If I change COMPASS_CURSOR to one of the standard cursors ("wait", for instance), it changes to the correct cursor. It just doesn't seem to like custom cursors. I've also tried using this.map.setCursor(), which I'm guessing does the same exact thing as setMapCursor() because it also works on Chrome and Firefox but not IE and Edge. Am I doing something wrong? Is this just not supported on IE and Edge? Thanks, Mark
... View more
08-28-2015
12:18 PM
|
0
|
2
|
4159
|
Title | Kudos | Posted |
---|---|---|
1 | 10-09-2015 07:17 AM | |
5 | 08-17-2015 01:00 PM | |
1 | 05-27-2016 07:37 AM | |
1 | 10-07-2015 07:35 AM | |
2 | 04-18-2016 11:03 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|