Author Topic: 2011 vs 2010  (Read 2338 times)

0 Members and 1 Guest are viewing this topic.

Bryco

  • Water Moccasin
  • Posts: 1883
2011 vs 2010
« on: September 02, 2010, 05:37:58 PM »
Thought it might be nice to list any changes

this works in 2010
hatch.PatternAngle = 0;
hatch.SetHatchPattern(HatchPatternType.PreDefined, "Ansi32");

You need to use this in 2011  (edited as I had it the wrong way round)
hatch.SetHatchPattern(HatchPatternType.PreDefined, "Ansi32");
hatch.PatternAngle = 0;

« Last Edit: September 08, 2010, 07:45:38 PM by Bryco »

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: 2011 vs 2010
« Reply #1 on: September 02, 2010, 06:57:09 PM »
Good idea Bryce.
I don't have 2010 on this machine, so
does the 2011 option work in 2010 ?
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.

Bryco

  • Water Moccasin
  • Posts: 1883
Re: 2011 vs 2010
« Reply #2 on: September 02, 2010, 08:06:02 PM »
I'll check tomorrow. Sequencing issues are such a pain, I thought I would be lucky and roll my dll straight over, but I had to copy the whole project and download the 2011 arx to see if something had changes. With sequencing problems you get no actual error as you start the debug. I had the same problem with setting plot configs, (only on 2010) but changing the order makes it work.

sinc

  • Guest
Re: 2011 vs 2010
« Reply #3 on: September 03, 2010, 08:23:47 AM »
I know Autodesk is now getting more exception-happy, and there are things in Civil 3D's 2011 API that now throw exceptions where they used to return a null value.  This breaks code that worked fine in 2010.

Jeff H

  • Needs a day job
  • Posts: 6150
Re: 2011 vs 2010
« Reply #4 on: September 07, 2010, 05:53:29 PM »
I hear CapturePreviewImage in 2011 is fixed and will be in the upcoming update.

Bryco

  • Water Moccasin
  • Posts: 1883
Re: 2011 vs 2010
« Reply #5 on: September 08, 2010, 07:44:11 PM »
It works both ways in 2010
It has to this way in 2011
h.SetHatchPattern(HatchPatternType.PreDefined, sHatch);
h.PatternAngle = (double)acadApp.GetSystemVariable("hpang");