sorry, both the following are initiated by me manually typing NETLOAD at the command and choosing the dll file.
works = i can issue and embedded command "MYCOMMAND" and get a "Hello World" printed to the command line and the main function of trapping a double-click event and replacing the normally returned form (acad's block editor) with our own custom form.
does not work = upon choosing the dll file, i get no errors or notifications, but "MYCOMMAND" doe NOT return "Hello World" and the double-click event does not produce our custom form.
and it only does NOT work on one computer, and it does not work in etiher the normal user profile nor when i log in under an admin profile. which is why i feel it's something like a global security setting on that machine. (the user is a local admin with full local rights)
It may be possible, but you have to start testing and ruling out what you can. Why couldn't it be a problem with your code/dll? Try creating a test dll that just pops a message box that says "Hello World". Don't use the command line as that depends on references. If something simple works, you know its not file access rights. It could be something like that pc has acad installed differently and the mgd files can't be found.
perhaps, but all these boxes have come from a standard image that we use for all cad workstations, so the install should be identical across the board.
did i mention i've tried repairing (to no avail) then actually uninstalling and re-installing acad (to no avail, although i did not go through the registry and kill all the related keys - but think it should have gotten me close enough if the problem was realted to an install (we also use standard profiles and workspaces in the office)).
The suggestions I offered are a whole lot quicker than uninstall/reinstall. Give it a try. Until you verify through testing that the problem is NOT with your code, you're spinning your wheels testing the OS.
ok, i guess what i'm going after is if anyone has any thoughts about settings, since the code DOES work (whether auto loaded or manually loaded) on a lot of other machines. and that it also doe not work on multiple profiles on that one machine.
but i've got the programmer doing the dialog suggestion now. so i'm expecting that upon loading, i'll get the popup dialog
I thought you were the programmer. Accurate information is important for troubleshooting. Think of it like working on a car. If your car doesn't start, what you you do first? Start replacing spark plugs, air filter and fuel filter, or run some diagnostic test to get information? Friday my son called me, his motorcycle had stalled. I could hear him cranking the starter and the battery was going dead. So we set out getting a new battery. It was late and we couldn't get one, so I brought the old one home and charged it hoping it would last long enough for him to get home. It cranked but the bike still wouldn't start. Then I found out it went dead because he had been cranking on it trying to get it started again. Wish he had told me that at first. Once I had some accurate info, I traced it to a disconnected vacuum line. Troubleshooting is all about getting good information. Since you aren't a programmer you may have missed it, but the suggestions I gave you are way to get info you wouldn't normally get. Like plugging in an engine analyser. Even though the dll works fine on most pc's, its still possible that the code can fail on one. The code uses the pc's resources. If it uses them improperly or if the resources aren't available, then the code fails. You're looking for some setting to be different on that pc, but you realize that something on that pc is different. That something could be a resource that the code depends on. The only way to know is to do some diagnosting testing. In the programming world, we call that debugging.
BTW, if you do get a simple dialog to display, that tells you that the basic framework is ok. The problem must lie with the dll that won't work. More thorough debugging would be required. In the car analogy, that's like eliminating a lot of possible problems by first checking for spark to see if its an electrical problem or a fuel problem.
fair enough, but after a decade at this office i've learned that i can take certain liberties in troubleshooting. the fact that they all come from the same image for the same model dell box with the same specs usually is enough of a safeguard that i can relay on if only a single computer is bombing.
and at this point, we're just gonna re-image it anyway and try that.
Please FULLY describe the problem you ran into. For example, when you said:
"MYCOMMAND" doe NOT return "Hello World",,,
Not returning what you expected, is just one of the possible symptoms that show "it does not work". Once you issued "MYCOMMAND" command, if the "Hello World" is not shown, does AutoCAD shows "Unknown command" (or something like that), of nothing at all (very unlikely, but according to your description, it seems the case?).
Does your DLL implement IExtenseionApplication interface? If yes, do you have proper try...catch exclosed the code in Initialize(). If not, exception in Innialize() would fail loading the DLL assembly (then, when you enter command MYCommand", you should get AutoCAD prompt for "unknown command").
Sorry ejobe, let me requote again what you wrote:
"Also, since the dll is loading on an event, it behaves a little differently than manually loading it"
I was asking you what 'event' the DLL is loading on, and why it would behave differently (loading or code execution, it does not matter which) if it is loading on 'event' verses being loaded manually via NETLOAD.
Could you please clarify that?
Most of us are all well aware that if an exception is raised in the IExtensionApplication.Initialize() method, it will prevent registering of commands and event handlers, but that will happen regardless of how a dll is loaded (e.g., on an 'event' as you put it, or manually).
As far as I know and have seen based on my own testing, there is no difference in the behavior of code execution that depends on how a dll is loaded. And I'm still not understanding what you mean by 'loaded on an event'.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register