Author Topic: Managed API Rant  (Read 5291 times)

0 Members and 1 Guest are viewing this topic.

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: Managed API Rant
« Reply #15 on: December 28, 2011, 10:04:15 AM »
Kerry,

I agree with you and should add it's a shame that the ActiveX documentation is no more availalble since A2011 in spite of the fact that VBA is still available and Visual LISP or .NET can use this API (Autodesk recommend to migrate VBA applications to .NET using the AutoCAD COM API).

PS: when these docs exists, they're only available in English...
Speaking English as a French Frog

ChuckHardin

  • Guest
Re: Managed API Rant
« Reply #16 on: December 28, 2011, 12:28:57 PM »
You know this is why I love this site and hate that Randall has left the circle.
At the very least with Randall you got an answer that taught you a lot about coding and he had a wealth of information about the APIs. The LL was a wonderful tool. The forum was highly helpful just as this one is. I notice a lot of the same Q&A here as there was with RR's Sites. All of you make this site one of the best on the internet not just for AutoCAD but for coding in general. TheSwamp is one of the best places to ask any coding question and replies are always fast and most of the time spot on. The only problem I have is communicating my needs. Code I can write getting the problem stated is another challenge.   :oops:

 
Thank you for all your help!

joshua.modglin

  • Guest
Re: Managed API Rant
« Reply #17 on: December 28, 2011, 09:00:22 PM »
Not to start something else but if Autodesk asked, what would you do to the documentation? How would you change/increase/view the documentation?

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8696
  • AKA Daniel
Re: Managed API Rant
« Reply #18 on: December 28, 2011, 09:36:07 PM »
As of now, the docs for the managed API are just generated from the headers...  the comment is usually something like... This .NET class wraps the XXXX  ObjectARX class, please RTFARXDOCS  :lol:
« Last Edit: December 28, 2011, 09:43:39 PM by eBadHeadache »

Jeff H

  • Needs a day job
  • Posts: 6150
Re: Managed API Rant
« Reply #19 on: December 28, 2011, 09:51:46 PM »
And you see this many times
 
DbCadObj.SetGraphProtocol()
Sets the GraphProtocol
.....................................
So go to GraphProtocol definition
..........................................
 
GraphProtocol
A class that DbCadObj uses for protocals.
 
 
 ............................................................
Now go to TheSwamp.org and ask what is it.
 ...............................................................

JohnK

  • Administrator
  • Seagull
  • Posts: 10634
Re: Managed API Rant
« Reply #20 on: December 28, 2011, 10:42:43 PM »
horrible docs produced from comments is no excuse imo. qt, kde, llvm, cmake, etc.

look up doxygen.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8696
  • AKA Daniel
Re: Managed API Rant
« Reply #21 on: December 29, 2011, 02:51:30 AM »
horrible docs produced from comments is no excuse imo. qt, kde, llvm, cmake, etc.

look up doxygen.
:oops:


I guess, I should rephrase, when you think using doxygen to list just the signatures in a fancy format 'is' documentation, then there is a problem   :mrgreen:

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Managed API Rant
« Reply #22 on: December 29, 2011, 03:41:41 AM »
Not to start something else but if Autodesk asked, what would you do to the documentation? How would you change/increase/view the documentation?

Self contained documentation, not reliant on reading with something else.
Type Descriptions. (more than a generic 5 word sentence)
Member Descriptions: (ditto)
Usage examples.
Linked References .. for things like enumerators, typed parameters, typed returns
Do not assume that the user has a degree in Computer Science and develops full time .

Some of the examples for the old VBA documentation were quite good.

Drop the idea that VB is easier to learn than C#. Both languages are easy to learn, even if they are syntactically different in some ways ... The API's are what takes the time and effort to learn.

Add Option Strict On and Option Explicit On to all VB samples ... it may make for better translations and a more consistant code standard.

Generally the Parameter naming used in the Reference Guide is quite descriptive (good)

There was a discussion here a couple of weeks ago involving several AutoDesk luminaries (gopinatht, Stephen) The Summary was :
Quote
    1) Always use the "using" statement with the transaction object
    2) Always use the "using" statement with newly created DB Objects being added to the transaction
    3) Always using the "using" statement with DB Objects that are not added to the database
    4) You dont have to use the "using" statement with existing DB Objects opened with a transaction object
This type of information SHOULD be documented and available to everyone.

I think we all already know what constitutes effective documentation, and are aware that it will become more important as new customisers start to come to grips with dotNet.
As I said earlier, it is time to do something about it, and without further procrastination.

Regards
kdub






« Last Edit: December 29, 2011, 06:08:50 AM by Kerry »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Jeff_M

  • King Gator
  • Posts: 4094
  • C3D user & customizer
Re: Managed API Rant
« Reply #23 on: December 29, 2011, 09:44:05 AM »
Well said, Kerry. There isn't one point you made that I disagree with.

I would only expand the item list by one:
If an API is provided for a vertical product, apply the same rules to THAT documentation as well.

Jeff H

  • Needs a day job
  • Posts: 6150
Re: Managed API Rant
« Reply #24 on: December 29, 2011, 01:23:00 PM »
If an API is provided for a vertical product, apply the same rules to THAT documentation as well.
Don't get me started on MEP.
For 2012 and I think 2011 they said the hell with it and just use 2010 documentation.
 

MexicanCustard

  • Swamp Rat
  • Posts: 705
Re: Managed API Rant
« Reply #25 on: January 03, 2012, 07:44:14 AM »
If an API is provided for a vertical product, apply the same rules to THAT documentation as well.
Don't get me started on MEP.
For 2012 and I think 2011 they said the hell with it and just use 2010 documentation.

Amen brother!

Look at the online documentation for .NET, complete descriptions and multiple code examples. If it can be done for the entire Microsoft .NET API it can easily be done for AutoCAD's .NET API.
Revit 2019, AMEP 2019 64bit Win 10

Jeff H

  • Needs a day job
  • Posts: 6150
Re: Managed API Rant
« Reply #26 on: January 03, 2012, 07:52:47 AM »
I have this feeling that most resources are probably going into a new API that will be compatible for PC and MAC

Bryco

  • Water Moccasin
  • Posts: 1883
Re: Managed API Rant
« Reply #27 on: January 03, 2012, 10:17:45 AM »
The help in vba is far better. They could use that as a model for sure.  I converted all my code to C# and it took forever. Every step of the way there is some small difference that an example would have helped. Money wise the conversion was way too costly and  w/ vba still usable I wouldn't have bothered if I had known it would be so much trouble. If someone at the office wanted do a little coding I wouldn't recommend net at all. It would have to be lisp as with not too much work they could write something that gives them the itch to continue.

Jeff_M

  • King Gator
  • Posts: 4094
  • C3D user & customizer
Re: Managed API Rant
« Reply #28 on: January 06, 2012, 10:16:15 AM »
Well said, Kerry. There isn't one point you made that I disagree with.

I would only expand the item list by one:
If an API is provided for a vertical product, apply the same rules to THAT documentation as well.
Looks like the Civil3D team was listening: New C3D API Help This is a HUGE improvement! But, as usual, they need some better proofreading ... in the 10 minutes I spent looking through it, I found one method that had another method's example shown, then when I tried to report it I got a new email message to compose...but no address in the "To:" line so it could not be sent.