Author Topic: How do I interup my program to execute a manual command?  (Read 1871 times)

0 Members and 1 Guest are viewing this topic.

RMS

  • Guest
How do I interup my program to execute a manual command?
« on: November 11, 2010, 08:20:44 PM »
Hey all great site!

I am using AutoCAD 2008 and VS 2005 and I was just wondering how I could set up a "pause/?" so I could execute a manual command then resume control to the program. What my program does is it loops through 120 csv text files in a directory and builds parts based on the points made with just closed polylines, then does a save and goes to the next csv file and repeats.

I would like to intervene and do an offset to the polyline a manual execution to each part. I tried acDoc.SendStringToExecute("._offset  ", True, False, False) but the code just rips right pass it with blazing speed? Any Ideas? I did try to code the offset BUT sometimes the offset was on the wrong side.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: How do I interup my program to execute a manual command?
« Reply #1 on: November 12, 2010, 12:17:07 AM »
Without knowing exactly how you are coding it, it will be hard to know exactly what to do, however, if you change your way of thinking just a bit, you can see it is not really that difficult.

How about, instead of making the offset of the polyline a function to be executed after the importing of the CSV, make the importing of the CSV predicated on the function to offset the polyline. You should still be able to wait for user input.

In other words, don't call the function to offset the polyline from the reading loop, call the reading of the file from the offsetting function.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

RMS

  • Guest
Re: How do I interup my program to execute a manual command?
« Reply #2 on: November 12, 2010, 05:21:13 PM »
Hey Keith,

Thanks for the advice and I will re-think my approach on this.