I am trying to run a third party utility to add line-numbering to my code at compile time for my VB6 projects.
Can someone tell me what the syntax is for adding an argument? I keep getting the following error no matter what argument I specify:
Invalid syntax for constant declarations
One or more of the properties in ‘C:\PHC\onesource\bin\MSP\MOMD\src\FBTemp.vbp’ was bad. Some or all of the properties might not be set correctly.
I have tried the following:
/cmd
/c
Also- is there a way to see what the actual command passed to vb6.exe was?
Hi Owen
The syntax is the same as it is in VB, eg:
Conditional=1:AnotherConditional=0:More=1
The command line is vb6.exe /make c:\temp\fbtemp.vbp /d Conditional=1:AnotherConditional=0:More=1
HTH
So are you saying the FB doesn't support using the /cmd option when compiling VB6 projects?
So are you saying the FB doesn't support using the /cmd option when compiling VB6 projects?
Unfortunately not. I can add it quite easily though. To be honest, when I wrote the VB6 action for finalbuilder 1 (about 6 years ago now) I couldn't figure out what exactly the /cmd option did when compiling the project from the command line. Even now, I'm none the wiser. The msdn site has two pages that document the command line options, and has two different descriptions for the /cmd option :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vb98/html/vbconcommandline.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconusingcommandlineoptions.asp
If you could point me to some information that might help me figure out what it does I will be gladd to add support for it (I need to know what it does so that I can actually test it).
Vincent,
The /cmd option, as I understand it, simply allows you to pass command line arguments to VB.exe, or any app built using VB6.
What I am trying to accomplish is to add line numbering to my application at compile time. I was looking for any utility that would add line numbering from the command line and didn’t find any so I was going to write my own. Then I did end up finding one written by Keith Dimmock (http://www.geocities.com/keith_dimmock/kdaddin2.html)
I have tested it (version 5.0.6) from the command line and from the IDE and it does work. This is the syntax for the command I used (from the command line):
vb6.exe /make “C:\MyVB6Project.vbp” /d /out “MyVB6Project.dll” /outdir “C:\SomeDirectory” /cmd /kdline /kdout "foo.txt"
foo.txt logs what the line-numbering utility did.
In this case, the command line argument is /kdline which is an argument specifying to run the kdline application.
I’m not positive of the specifics, the only example MSDN gives is calling cmdlineargs (thanks Microsoft).
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/html/vafctCommand.asp
Let me know if this is enough, or if you need more.
Thanks a billion,
Owen
Thanks for this data!! Just what I’ve been looking for. Since I’m a new user of FinalBuilder, how would I include this into the script. In the “Compile Visual Basic Project” action or something else?
Thanks,
Dave
I have added support for this in the next update to FB4, there will be a CommandLineArgs property to the Visual Basic action that is only visible in the action inspector. I have no way to test this option though, I have followed what I could from the minimal msdn doco.
Great. Thanks!! What is the release date for that update?
We should have a test build available later today, I’ll post here when it’s available for download.
Hi Owen
The the test build with the changes mentioned above is here :
https://www.finalbuilder.com/downloads/finalbuilder/420/FB420_300.exe
Awesome- thanks!
I'm not sure when I'll be able to test it out, but when I do- I'll let you know how it goes.
Owen
I have tested the “CommandLine Arguments”, within the “Compile Visual Basic Project” action, with the “KDAddIn” line renumbering and it works perfectly!!
Syntax:
/cmd /kdline /kdout "LineNumber.txt"
Thank you to all for the data and the build!
Dave