Author Topic: ZoomPrevious in Pure ObjectARX code  (Read 1513 times)

0 Members and 1 Guest are viewing this topic.

cannorth

  • Guest
ZoomPrevious in Pure ObjectARX code
« on: March 04, 2014, 09:51:11 PM »
Hello,

  I'd  like to know if there is code for a purely ObjectARX ZoomPrevious method from AutoCAD's COM API?

Thanks,

cannorth

MickD

  • King Gator
  • Posts: 3637
  • (x-in)->[process]->(y-out) ... simples!
Re: ZoomPrevious in Pure ObjectARX code
« Reply #1 on: March 05, 2014, 12:55:50 AM »
save yourself the headache:

acadDoc.SendStringToExecute("ZOOM p\n", false, false, false);

While it might seem like a hack, you are implementing it fast and safely avoiding possibly buggy code to do something that acad could probably do quicker albeit in a roundabout way.
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: ZoomPrevious in Pure ObjectARX code
« Reply #2 on: March 05, 2014, 01:28:21 AM »

interestingly, AutoDesk use a similar code in their ARX samples

Code - C++: [Select]
  1. acedCommand(RTSTR, _T("_ZOOM"), RTSTR, _T("_Extents"), 0);    // zoom to a reasonable spot
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.