|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I need to know how I can use VB to input data into any software. I am currently working on a project which involves feeding data into CPLEX, which is a linear program solver. I am extremely new to VB and I don't know anything about it. I have to do the linking of VB and CPLEX myself. Can anybody give me some tips on how to proceed and some good book that I can refer? Regards, Jasdeep Saran |
|
#2
|
|||
|
|||
|
Some years ago I was working with G2 (the simulation language, the pure object language, a shame $$$$$), I am not sure but, I think we send data to CPLEX writing data to a text file and running and feeding CPLEX with the specific file. VB is OK for doing it, but you should seek documentation about how to send data to it, and to retrive the results, if this version suport DDE or something else.
Beware with CPLEX set the maximum lenght of the search tree or you can spend days before finish it. If you told us how are you specting to feed CPLEX the info, may help to be more specific with the help. About VB almost any book could help and use http://msdn.microsoft.com/library/d...l/vb6anchor.asp (an excellent resource), and learn from the code that many programers share. I hope this help. |
|
#3
|
|||
|
|||
|
essentually
have Vb put the info into another file, then have the other program take the data from the file.
if you know how to do this skip the next section, otherwise: use NOTEPAD.EXE to create a file that you wish to use, or a 'template' basicly have a line for each piece of data that you wish to use and plug a empty integer into the line this is what you would have the document read: 0 0 0 0 go to save as, where it says '.txt' select 'all file types' and where you type the filename, put a '.' whatever behind it, ex: test.tst go into Vb, go into the coding, this is the coding you would use to write the data to the file open "test.tst" for output as #1 print #1, (data goes here) print #1, (data goes here) print #1, (data goes here) print #1, (data goes here) close #1 if your going to use test.tst as a template type file then use the following coding: name "test.tst" as "(werever you want to put the file)" Vb will COPY the file and rename it, and when it runs back through writing the data, it will overwrite the old data, assuming it has the same amount of digits. |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Inputting data through VB |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|