Author Topic: .NET Documentation questions.  (Read 4953 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
.NET Documentation questions.
« on: November 24, 2015, 03:06:08 AM »
We have been given an opportunity to resolve some issues and/or shortcomings with the .NET documentation for AutoCAD (and verticals).

In the 10 (or so) years that .NET has been used in AutoCAD there have been quite a few changes, in both the .net and AutoCAD assemblies. If we do a web search for information chances are some will be out of date , some misleading, some guesses and some just plain incorrect.

Wouldn't it be 'nice' if the documentation for the AutoCAD API could be used as a complete and single resource for developers/customizers/hobbyists without the need to comb through forums and blogs to get the information we need to successfully add value to AutoCAD with economical solutions to service our client's particular requirements. 

Personally I'd enjoy telling someone to "Read the Flipping Manual" and be confident they would resolve their issues.

What information do you want included in the documentation that is not currently there ?

The ground rules are simple.
Be explicit.
No bitching.
Be realistic.

If you come across documentation that is terse , technically challenging , or incomprehensible please include it as well.

Beginners are encouraged to participate.

I imagine this process will be ongoing so please keep the forum relatively clean and on topic.

Regards,
Be kind to each other.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

Andrey Bushman

  • Swamp Rat
  • Posts: 860
Re: .NET Documentation questions.
« Reply #2 on: November 24, 2015, 03:29:23 AM »
For example, I want to see in the official documentation additionally such info (for AutoCAD .NET API):

1. Working with the styles: text styles, table styles, dimension styles, etc (the EACH option of them what I see in their dialog windows). I spent a lot of time to know how to work with some of these options in the AutoCAD 2009 in the past (some of the problems are not exist in the newer AutoCAD versions). :(
2. Detailed info about the check standards (I read this  but this has errors and is not enaugh for me). Also I read some info in the ObjectARX SDK 2010, but it was for C++ instead of .NET and has not the expanded code samples.
3. Unit testing of the managed\unmanaged plagins of AutoCAD. By Autodesk I saw this only.
4. Creating the definitions of the dynamic and parametric blocks (if this is possible).
5. Known API bugs and the workarounds.
6. The code samples of working with DXF through .NET API. Something I see for VB6 in the documentation, but current information is not enough (for me).
7. Examples of the mistakes which are made by developers most often (when they use AutoCAD .NET API). Sometimes it may be interesting not only for beginners.

Some of these themes I know decissions, but I didn't see the necessary info in the documentation when I was searching it in the past.
« Last Edit: November 24, 2015, 04:57:56 AM by Andrey Bushman »

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: .NET Documentation questions.
« Reply #3 on: November 24, 2015, 03:43:27 AM »
What information do you want included in the documentation that is not currently there ?
Whether correctly I understood you what you are asking about what I (like the user or developer) want to see in the documentation additionally?

Yes Andrey.
Additional content,
Content to be fixed,
To be expanded,
To be clarified.

I'd like to think of the document as something we could give to a programmer and then lock her away for a couple of weeks , knowing they had all the information they would need.

Far fetched and fanciful ? yes ; a reasonable goal ? yes.
« Last Edit: November 24, 2015, 03:46:58 AM by Kerry »
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

Andrey Bushman

  • Swamp Rat
  • Posts: 860
Re: .NET Documentation questions.
« Reply #4 on: November 24, 2015, 03:56:38 AM »
Oops... I rewrote my last comment instead of creating the new ones... Read it again, please.

Andrey Bushman

  • Swamp Rat
  • Posts: 860
Re: .NET Documentation questions.
« Reply #5 on: November 24, 2015, 05:13:27 AM »
What target of the topic? Is the question by Aytodesk? Will be reading the wishes by Autodesk and the new themes into the official documentation can be appeared in the future as a result?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: .NET Documentation questions.
« Reply #6 on: November 24, 2015, 05:18:30 AM »
Have a look at the comments here
http://through-the-interface.typepad.com/through_the_interface/2015/11/au-2015-handout-virtual-reality-viewing-of-3d-models-using-autodesks-view-and-data-api.html#comment-2375809400

This is why the ground rules I mentioned in the first post are important.

Be explicit.
No bitching (complaining)
Be realistic.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

Andrey Bushman

  • Swamp Rat
  • Posts: 860
Re: .NET Documentation questions.
« Reply #7 on: November 24, 2015, 05:33:03 AM »
Be realistic.
At this case I haven't any wishes.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: .NET Documentation questions.
« Reply #8 on: November 24, 2015, 05:59:51 AM »
Be realistic.
At this case I haven't any wishes.
Not even a little funny.
We may as well all retire and forget about it.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

Andrey Bushman

  • Swamp Rat
  • Posts: 860
Re: .NET Documentation questions.
« Reply #9 on: November 24, 2015, 06:06:01 AM »
Yes it would be right. I incorrect understood the theme purpose (maybe because my English is bad). On the base of first message of this theme I thought the Autodesk has the plans for editing documentation and therefore they want to get the wishes about it.

Keith Brown

  • Swamp Rat
  • Posts: 597
Re: .NET Documentation questions.
« Reply #10 on: November 24, 2015, 09:40:53 AM »
The number one issue for me would be the lack of xml documentation included with the API's.  It just boggles my mind that 10 years after creation this is still not implemented.


There should at a minimum be a short summary, a description of each parameter and what it does, and a description of each exception that could be thrown.
Keith Brown | AutoCAD MEP Blog | RSS Feed
AutoCAD MEP 2014 / Revit MEP 2014 / EastCoast CAD/CAM addon / Visual Studio 2013

dgorsman

  • Water Moccasin
  • Posts: 2400
Re: .NET Documentation questions.
« Reply #11 on: November 24, 2015, 11:21:40 AM »
Oh yeah.  XML documentation to provide some contextual assistance would be huge.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

MexicanCustard

  • Swamp Rat
  • Posts: 705
Re: .NET Documentation questions.
« Reply #12 on: November 24, 2015, 01:15:35 PM »
The number one issue for me would be the lack of xml documentation included with the API's.  It just boggles my mind that 10 years after creation this is still not implemented.


There should at a minimum be a short summary, a description of each parameter and what it does, and a description of each exception that could be thrown.

^^^^ THIS!

Oh, and for the verticals too!


SIde Mission:
Can we do anything about adding the properties palette to .NET without using COM?
Revit 2019, AMEP 2019 64bit Win 10

dgorsman

  • Water Moccasin
  • Posts: 2400
Re: .NET Documentation questions.
« Reply #13 on: November 24, 2015, 02:13:27 PM »
I think that would essentially involve creating your own palette.  Creating your own simple properties palette should make for a really good "How to" example.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: .NET Documentation questions.
« Reply #14 on: November 24, 2015, 09:25:38 PM »
Advice regarding the use of Transactions is contradictory.

Refer the ..\ObjectARX 2016\Samples\dotNet\ files

Typically the Tables are instantiated using the GetObject method of the TransactionManager.
The AddNewlyCreatedDBObject method variously uses the Transaction and the TransactionManager
Code - C#: [Select]
  1.         Database db = Application.DocumentManager.MdiActiveDocument.Database;
  2.         Autodesk.AutoCAD.DatabaseServices.TransactionManager tm = db.TransactionManager;
  3.         using (Transaction myT = tm.StartTransaction())
  4.         {            
  5.                 BlockTable bt = (BlockTable)tm.GetObject(db.BlockTableId,OpenMode.ForRead,false);
  6.                 BlockTableRecord btr = (BlockTableRecord)tm.GetObject(bt[BlockTableRecord.ModelSpace],OpenMode.ForWrite,false);
  7.                 using (Line myline = new Line(start, end))
  8.                 {
  9.                         myline.ColorIndex = 3;
  10.                         btr.AppendEntity(myline);
  11.                         myT.AddNewlyCreatedDBObject(myline, true);
  12.                 }
  13.                 myT.Commit();
  14.         }
  15.  

Advice and examples elsewhere use the methods of the Transaction, which I understand is correct.


Why are they different ?



« Last Edit: November 24, 2015, 09:46:34 PM by Kerry »
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--