Author Topic: Tracing an object  (Read 730 times)

0 Members and 1 Guest are viewing this topic.

Offline Hermie

  • Active Member
  • Posts: 13
    • View Profile
Tracing an object
« on: February 26, 2018, 06:12:09 PM »
I am having a problem with a small bit of code and am hoping someone can help me.
I have some special maple and yew burls and slabs I need to trace so I mount one on the table and trace it using the
crosshairs in the video window. Until now I have been writing the dros down on paper and inputting them into Aspire
by hand.
That was ok before but now I have been given 5 more to do, so with your help, I would like to use a button to
record the dro to a file so I can speed things up a bit.
So far I have gotten the code into the button and it writes to the file but when I try to write the next line to the
file it overwrites the last line, could someone please have a look and tell me what I am missing?

   
Sub Main ()
Open "L:\test\TESTFILE.txt" For Output As #1 ' Open to write file.


   X = GetOEMDRO (800)
   Y = GetOEMDRO (801)
   Z = GetOEMDRO (802)


Write #1, X, Y, Z

Close #1

End Sub               


With many thanks; Herman

Offline TPS

  • Active Member
  • Posts: 1,116
    • View Profile
Re: Tracing an object
« Reply #1 on: February 27, 2018, 01:02:12 AM »
Open "L:\test\TESTFILE.txt" For Append As #1 ' Open to write file.
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline Hermie

  • Active Member
  • Posts: 13
    • View Profile
Re: Tracing an object
« Reply #2 on: February 27, 2018, 01:49:22 PM »
Thank you sir, this will save me a lot of time and tree carcasses.