I indicated very clearly that my last post was a hack.  I want to take a bit of time to explain exactly why it was a hack.  I’ll also point out things that were not a hack.

 

Assuming I could properly emulate Job Processor
Verdict:  Hack
In theory, the hosting app and the plug-in are decoupled.  But the reality is that they often are not.  Unless an API provides specific support for this decoupling, you should assume a tight coupling.  The Vault API makes no claims that you can load and run Job Handlers outside the context of Job Processor.

Using JobProcessor.exe.config to figure out the DLL and class for DWF creation
Verdict: Not a hack
If you’ve implemented a custom Job handler, you know that you have to edit JobProcessor.exe.config and add your own <jobHandler>.  So the <jobHandler> syntax is spelled out right in the API documentation.

Figuring out the parameters on Autodesk.Vault.DWF.Create.ipt
Verdict:  Hack
Just because one job showed a single parameter, FileVersionId, doesn’t mean that all jobs of that type have the same single parameter.  There may be optional parameters not shown.  There may also be cases where certain files require additional parameters.  Again, there is no way of knowing what those cases are.  Without any official documentation, the best one can do is guess.


Comments

2 responses to “More on Hacking”

  1. mr garrison Avatar
    mr garrison

    “there is no way of knowing what those cases”
    Well one way would be to decompile the autodesk dlls …

  2. Technically, that’s a violation of the EULA.
    Aside from that, decompiling isn’t a very feasible as a real world option.
    1. It’s time consuming. You’ll need to sift through thousands of lines of code to find answers for the simplest things.
    2. It’s subject to change. Undocumented features may change at any time without warning. So, you will be doing this for every release… maybe even every service pack.
    3. My experience is that you can almost never derive the meaning from just looking at the raw code.

Leave a Reply to Doug RedmondCancel reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading