PDA

View Full Version : Drop Down List


cmmguy
11-27-2007, 02:45 PM
Here is a utility to give you a Drop Down List in PCDMIS.

Download(right-click and click "save link as") the program and save it in your pcdmis programs folder(or where every you want to).
Suggested locations: C:\PCDUTIL\

File Moved: New Location (http://www.cmmguys.com/forum/showthread.php?t=153)

After downloading, rename the extension from .txt to .exe

Usage:

STARTUP =ALIGNMENT/START,RECALL:, LIST= YES
ALIGNMENT/END
LOADPROBE/TP20-3X50
COMMENT/DOC,NO,***************************
COMMENT/DOC,NO,Preload the "NO ANSWER" to check for no response from operator
ASSIGN/DROPLIST = "NO ANSWER"
COMMENT/DOC,NO,***************************
COMMENT/DOC,NO,Command line to get the drop down. PCDMIS has a 256 character limit per line.
EXTERNALCOMMAND/NO_DISPLAY, WAIT ; C:\PCDUTIL\DROPLIST.EXE Choose Operator|Ted Bundy|Henry Lee Lucas|John Wayne Gacy|Jeffrey Dahmer
COMMENT/DOC,NO,***************************
COMMENT/DOC,NO,Test for "NO ANSWER" and branch to end of program(handle as you want)
IF_GOTO/DROPLIST == "NO ANSWER",GOTO = END_OF_PRGM
COMMENT/DOC,NO,***************************
COMMENT/DOC,NO,
COMMENT/DOC,NO,***************************
COMMENT/DOC,NO,Just a comment to test the results
COMMENT/OPER,YES,DROPLIST
COMMENT/DOC,NO,***************************
COMMENT/DOC,NO,
COMMENT/DOC,NO,
COMMENT/DOC,NO,Part Program here.....
COMMENT/DOC,NO,
COMMENT/DOC,NO,
COMMENT/DOC,NO,***************************
COMMENT/DOC,NO, Here is the Label that the above test goes to.
END_OF_PRGM=LABEL/



EXTERNALCOMMAND/NO_DISPLAY, WAIT ; C:\PCDUTIL\DROPLIST.EXE Choose Operator|Ted Bundy|Henry Lee Lucas|John Wayne Gacy|Jeffrey Dahmer
The parameters for the utility are:

Drop Down List Title Required
Field delimiter(Pipe) Required
List items At least one required

List items are show in the order that they are entered. A sort does not occur.

The variable in PCDMIS must be DROPLIST.

Wes Cisco
11-27-2007, 02:49 PM
You forgot Charles Manson.:eek:

cmmguy
11-27-2007, 03:08 PM
He's small potatoes...

spazus_maximus
11-28-2007, 09:20 AM
Thanks for posting this J.....You are the man!

ClayOgre
01-14-2008, 02:21 PM
Okay...so this is an external program that passes a value back into PC-DMIS, is it done through the variable DROPLIST? How is this value passed back? What language is the external program written in? Can anything capable of returning a value on the MS-DOS command line be used?

cmmguy
01-14-2008, 02:26 PM
Okay...so this is an external program that passes a value back into PC-DMIS, is it done through the variable DROPLIST?
Yes

How is this value passed back?
Directly back to the variable object in PCDMIS. That is why the Variable has to exist in PCDMIS first.

What language is the external program written in?
VB6

Can anything capable of returning a value on the MS-DOS command line be used?

Not sure I understand the question.

ClayOgre
01-15-2008, 09:52 AM
Quote:
Can anything capable of returning a value on the MS-DOS command line be used?
Not sure I understand the question.

Well...I am not sure if I am asking the right question, so that probably clouds things further. My understanding of such things isn't entirely clear. Anyway, there is this thing about stdin and stdout (at least I think these concepts apply to windows stuff and not just to Linux). I am guessing that an external program that passes a value through stdout can pass a value into PC-MDIS? Would your program be using this concept to pass the value back to PC-DMIS, and if so, does that mean that any program, written in whatever language, as long as it uses stdout (or whatever the windows equivalent is), pass a value back into PC-DMIS? Does it necessarily have to be Visual Basic?

Anyway, the above is what I am referring to when I say "return a value to the MS-DOS command line." If I write a simple script in some language, that say, adds two numbers togeter and prints out a value on the command line, then call that script from PC-DMIS with an appropriately named variable, will the value be passed back into PC-DMIS?

cmmguy
01-15-2008, 12:38 PM
I dont know. I use the high-level object language of Windows applications and dont get into the underlying communication methods. I create a PCDMIS object and then communicate with that object using the exposed "subobjects" and commands.