I am trying to use Visual Basic (6!) to perform some automation on the codewarrior IDE. So far I can do the basics; load a project, get the current target, get a list of the files in the build order, etc.
I would like to extract a command line style string of the compiler and linker arguments. The closest thing I can find to this is the ICodeWarriorTarget::GetNamedPanelDataField method. I tried this as a test:
Dim st
Set st = oTarg.GetNamedPanelDataField("Target Settings", "Targetname")
MsgBox st
but all I get is a "Type Mismatch" error. How do I properly call this method? Or even better, how can I get a string of the command line compiler/linker options via Automation?
(btw, i've scoured the help files, internet, messageboards here, etc.)
Solved! Go to Solution.
Dim st
st = oTarg.GetNamedPanelDataField("Target Settings", "Targetname")
MsgBox st
thanks for the reply! I had figured out to export to XML to view the specific names in question. I'm ok with gathering the settings one by one, but I can't get the call to work in VB6:
Dim st
Set st = oTarg.GetNamedPanelDataField("Target Settings", "Targetname")
MsgBox st
gives me a "Type Mismatch" error on the call to GetNamedPanelDataField.
How do I properly call this function?
Dim st
st = oTarg.GetNamedPanelDataField("Target Settings", "Targetname")
MsgBox st
Export a project to xml, GetNamedPanelDataField is using the same names for the filed as are used in the exported xml's.
Some CW targets (HC08/HC12) store command line arguments as text stings, for those you can get them in this format. Others (CF, EPPC,..) store the individual settings separately, so for those you can get the individual settings but no command line string.
Daniel