PDA

View Full Version : Automating the To - From fields for lists



dave
11-21-2006, 05:51 PM
How can this be accomplished. I tried briefly tonight. I think it may be as easy as finding where the data is stored for the run terminators, namely the TO and FROM fields. It's not in the RUN_TERM table strangely enough. Thanks

Data Wrangler
11-22-2006, 07:07 AM
Are you asking about Process, Runs or on-off arrows?

D

dave
11-22-2006, 07:14 AM
Process runs

dave
11-22-2006, 03:01 PM
Basically I would like to drastically minimize the time it takes me to update the To / From values in our line list. There must be a way to do this.

Data Wrangler
02-08-2007, 10:18 AM
Dave-

Did you get any further with this?

I have a project for which I need to use this information.

Derek

dave
02-08-2007, 11:26 AM
I haven't Derek, sorry man.

Data Wrangler
02-08-2007, 11:57 AM
OK - I have to figure this out for a line list, so I may have more information for you in a while.

Derek

dave
02-08-2007, 07:28 PM
cool Derek, lets us know what you find out.

HybridAWD
02-09-2007, 08:45 AM
Dave can you elaborate on what you want to do, I'm confused for some reason, maybe im trying to make it sound more difficult that what you really are asking.

dave
02-19-2007, 03:44 PM
Nick, I am trying to not have to do anything to the TO / FROM fields in the project DB. Just have them populate automatically. :)

Aplant Monkey
02-20-2007, 11:05 AM
One of the things we have found is that the Very first instance of a line MUST be labeled as Run 1. If this is not the case then the To & From get mixed up. For a while we also erased every ternminator except the first and last one. This ended up causing some grief so I don't recomend it. I would have to check but I think we made a change to the PID_SUP where we used Run 1 for the first instance and Run 1A for the last. Had the DB search for these entries and populate the proper fields. It has been a while so I will have to look back at a few things.

HybridAWD
02-21-2007, 07:08 AM
Sorry for the blurry picture, not sure why it came out like that but... is this something you are looking to do?

dave
02-21-2007, 07:16 AM
Monkey, so you had to create new fields in your run table (or run term?) and then fill in the values for run1 and run1a. You would then put those fields in your report? What about when the line has only one run?

Hybrid: Yeah, without having to manually plug in the data for the TO/FROM's

PeterJ
02-21-2007, 07:25 AM
there is some code to make reports show the FROM from the first run and the TO from the last run in a single line. It is used in the line list of the KKS-base project. If I ever find the time, I'll write a procedure about this.

HybridAWD
02-21-2007, 08:10 AM
Dave here is the code. It's a lot to explain, but if you need help with it let me know. I'm pretty sure this is what you are looking for. This is just part of an event within the report.

Option Compare Database
Option Explicit


Dim defTagNoValue As String

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Not IsNull([ToFromTagType]) And Not IsNull([PDIRECT]) Then
If Left$([ToFromTagType], 5) = "AT_EQ" Or Left$([ToFromTagType], 4) = "AT_P" Then

If ([ToFromTagType] = "AT_PROCESS") And ([ToFromTagNo] = [TAG_NO]) Then
'skip
Else

If UCase$([PDIRECT]) = "FROM" Then
If [FromValue] = defTagNoValue Then
[FromValue] = [ToFromTagNo]
Else
If InStr(1, [FromValue], [ToFromTagNo]) = 0 Then
[FromValue] = [FromValue] + ", " + [ToFromTagNo]
End If
End If

ElseIf UCase$([PDIRECT]) = "TO" Then
If [ToValue] = defTagNoValue Then
[ToValue] = [ToFromTagNo]
Else
If InStr(1, [ToValue], [ToFromTagNo]) = 0 Then
[ToValue] = [ToValue] + ", " + [ToFromTagNo]
End If
End If
End If

End If

End If
End If
End Sub

Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As Integer)
[FromValue] = defTagNoValue
[ToValue] = defTagNoValue
End Sub


Private Sub Report_Open(Cancel As Integer)
defTagNoValue = "-----"
End Sub

dave
02-21-2007, 11:22 AM
Wow Hybrid, thanks for this. Lets break this down.


Dim defTagNoValue As String

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Not IsNull([ToFromTagType]) And Not IsNull([PDIRECT]) Then


ToFromTagType
ToFromTagNo
PDIRECT - what table are these fields in?

HybridAWD
02-21-2007, 12:10 PM
That is just an event script from my report, here is what the spreadsheet looks like. The stuff outlined with the red box are usually hidden under the detail so it's not shown on the report.

PDirect is just the information pulled from the run terminators, whether they are TO or FROM. Here is what it looks like properties wise.

dave
02-21-2007, 12:32 PM
Herm, so where is Pdirect again?

Mine is in the PID_TOFR table under flow_dir...

HybridAWD
02-21-2007, 12:48 PM
ours may be setup different. If i can figure out how to export my report, ill surely upload it so you can test it out. I might have to send the table as well, let me see if I can figure it out. 3MB

HybridAWD
02-21-2007, 12:52 PM
do you want me to give you a projdata and project.mdb, then you can create a project using those, then just grab the list and report from those? You can then modify all of the Delta-T stuff out to make it say whatever?

dave
02-21-2007, 12:54 PM
yes please :)

HybridAWD
02-21-2007, 12:54 PM
what is the best way to upload 3mb to you?

dave
02-21-2007, 01:03 PM
upload it to your ftp site

the client is here
www.davetyner.com/hybrid/ws_ftp32.zip (http://www.davetyner.com/hybrid/ws_ftp32.zip)

ftp.davetyner.com/hybrid (ftp://ftp.davetyner.com/hybrid)

check your PM's for the user/pass

or email me the zip at davetyner@gmail.com

Thanks man!!

HybridAWD
02-21-2007, 01:19 PM
I emailed it to you. the Line List Summary pulls from the table Line List1.

HybridAWD
02-21-2007, 04:23 PM
Did you get it to work? I'm bored sitting in class. :)

dave
02-21-2007, 04:31 PM
I opened and tried to bring in the report under our current format. You have a ton of customizations we don't have and I couldn't spend the time to rename fields to make it work. It looks good though and I am impressed that you did all that. Famous last words are...I will work on it when I can.

HybridAWD
02-21-2007, 04:35 PM
well really it should be pretty easy to get to work...

Import the Line List1 into your tables, then import the Delta-T Line List Summary. See if that works. Then again, we are venturing into a whole new world, I've never tried to do this.

Those customizations, can and have been a nightmare. They have accumulated over the years from the "know it alls" and I have had to fix a lot of the issues with conflicts between the projects and such.

dave
02-22-2007, 07:37 AM
So I download the zip file and open it initially. Didn't work in the few minutes I had to spare to look at it. I then looked at it again and all of the reports are gone. Weird I thought. So I check out the tables and a lot of your line data is there, weird I thought...Downloaded it on my other computer and get the same problem...wtf happened!?

HybridAWD
02-22-2007, 09:49 AM
Weird. I just checked the sent email and unzipped the file, it shows all of the reports underneath the project.mdb under reports. Hrmmm

dave
02-22-2007, 09:56 AM
yeah man, they were there and I looked at them. Then I opened it a few minutes later and they were gone. weird stuff... I will check again today to make sure I'm not losing it.

dave
03-21-2007, 10:14 PM
there is some code to make reports show the FROM from the first run and the TO from the last run in a single line. It is used in the line list of the KKS-base project. If I ever find the time, I'll write a procedure about this.

Peter, did you mean its the default setup on the KKS based projects?

dave
03-21-2007, 10:30 PM
One of the things we have found is that the Very first instance of a line MUST be labeled as Run 1. If this is not the case then the To & From get mixed up. For a while we also erased every ternminator except the first and last one. This ended up causing some grief so I don't recomend it. I would have to check but I think we made a change to the PID_SUP where we used Run 1 for the first instance and Run 1A for the last. Had the DB search for these entries and populate the proper fields. It has been a while so I will have to look back at a few things.


So after some digging, I said screw it and gave up looking for the location of the default To/From information resigning to a manually entering the data fate. On the way home I had a thought, check the default Line List view...so I did. I found them in the NOZZLE table, OF COURSE, IT MAKES TOTAL SENSE!! Line to from data in the nozzle table. You can imagine my elation of catching up to where you guys were in 2002. So, now I found it and can automate the to from list pretty easy in my test drawing with 3 lines on it.

Monkey, what is the big problem with erasing non relevant run terms?

Can you give a little bit mroe detail on your new fix?

Aplant Monkey
03-22-2007, 10:09 AM
As I am not really running with a AP project at the time I am sort of out of the loop as it were. I know that we now no longer earse the terms as it caused problems with the run tables. I will see if I can speak with our PID lead guys and see if they can shed some other light on what it is we are doing right now. I do know that the very first instance (From)of the line must be Run 1. I also know that the last instance of the line (To) we are calling Run 1A. This can be whatever you want as long as you are consisitant and tell the LDT what to look for ie Run 1 and Run 1A.
Hope that helps somewhat.

HybridAWD
03-22-2007, 07:09 PM
Dave, if I come out there, make a list of items you have a question about and we can discuss them. I know I always bring a list to the Conference as well.