Get settings via COM Automation

cancel
Showing results for 
Search instead for 
Did you mean: 

Get settings via COM Automation

Jump to solution
1,529 Views
BrendanDoonan
Contributor III

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.)

Labels (1)
0 Kudos
1 Solution
41 Views
BrendanDoonan
Contributor III

Dim st
st = oTarg.GetNamedPanelDataField("Target Settings", "Targetname")
MsgBox st

View solution in original post

0 Kudos
3 Replies
41 Views
BrendanDoonan
Contributor III

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?

0 Kudos
42 Views
BrendanDoonan
Contributor III

Dim st
st = oTarg.GetNamedPanelDataField("Target Settings", "Targetname")
MsgBox st

View solution in original post

0 Kudos
41 Views
CompilerGuru
NXP Employee
NXP Employee

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

0 Kudos