Author Topic: What did this do?  (Read 2374 times)

0 Members and 1 Guest are viewing this topic.

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
What did this do?
« on: May 08, 2016, 02:04:53 AM »
One of the api sample posts from the autodesk team from 2013...anyone know what the heck this did?  Apparently it was only available through the API

Code - C#: [Select]
  1. Here is a c# code snippet -
  2.  
  3. Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
  4.  
  5. CivilDocument cDoc = CivilApplication.ActiveDocument;
  6.  
  7. Database db = Application.DocumentManager.MdiActiveDocument.Database;    
  8.  
  9.  
  10.  
  11. using (Transaction trans = db.TransactionManager.StartTransaction())
  12.  
  13. {
  14.  
  15.   try
  16.  
  17.   {
  18.  
  19.     GreenEvaluate checkGreenEvl = new GreenEvaluate();
  20.  
  21.  
  22.  
  23.     // Call GreenEvaluatation to compute the Green factor and
  24.  
  25.     // Sustainablility factor for the current CivilDocument
  26.  
  27.     checkGreenEvl.GreenEvaluatation(cDoc);
  28.  
  29.  
  30.  
  31.     // Check the Green factor and Sustainability factor
  32.  
  33.     ed.WriteMessage("\nIs this Project Green ? :" + checkGreenEvl.GreenFactor.ToString());
  34.  
  35.     ed.WriteMessage("\nIs this Project Sustainable  :" + checkGreenEvl.SustainableFactor.ToString());        
  36.  
  37.  
  38.  
  39.     trans.Commit();
  40.  
  41.   }
  42.  
  43.   catch (System.Exception ex)
  44.  
  45.   {
  46.  
  47.     ed.WriteMessage("\nException: " + ex.Message);
  48.  
  49.   }      
  50.  
  51.  
  52.  
  53. }
  54.  

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: What did this do?
« Reply #1 on: May 08, 2016, 12:08:01 PM »
Where did you find that? Looks like someone had a class the checks the "Greenness" of a project....

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
Re: What did this do?
« Reply #2 on: May 08, 2016, 02:31:16 PM »
Where did you find that? Looks like someone had a class the checks the "Greenness" of a project....

It was one of Partha's post.  It's crazy... wonder what it even based it on.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2139
  • class keyThumper<T>:ILazy<T>
Re: What did this do?
« Reply #3 on: May 08, 2016, 03:12:32 PM »
Where did you find that? Looks like someone had a class the checks the "Greenness" of a project....

It was one of Partha's post.  It's crazy... wonder what it even based it on.


Why don't you ask him ??

Is your issue with the code or the 'Greenness' ??
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
Re: What did this do?
« Reply #4 on: May 08, 2016, 03:49:01 PM »
No issue...just thought it was interesting enough to discuss. Good point though.

ChrisCarlson

  • Guest
Re: What did this do?
« Reply #5 on: May 09, 2016, 10:10:00 AM »
Weird, do designers in Civil3D care about "greenness"?

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: What did this do?
« Reply #6 on: May 09, 2016, 10:24:49 AM »
LOL, apparently someone neglected to note the date on which that 'sample code' was was posted..... And quoted from the end of that post: "If you have any questions on this particular API, let's come back on the same day 'next year' to discuss about this!"

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
Re: What did this do?
« Reply #7 on: May 09, 2016, 09:01:33 PM »
haha...ya...kind of funny. Can't seem to message partha or post on the comment. Wonder if he's still with autodesk...my mail to him, which once worked, now bounces back...bummer if so
« Last Edit: May 09, 2016, 09:05:00 PM by Area51Visitor »

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
Re: What did this do?
« Reply #8 on: May 09, 2016, 10:01:43 PM »
haha...ya...kind of funny. Can't seem to message partha or post on the comment. Wonder if he's still with autodesk...my mail to him, which once worked, now bounces back...bummer if so

Dote...confirmed...Partha is no longer with Autodesk.  With Arcadis now.