Get settings via COM Automation

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Get settings via COM Automation

跳至解决方案
2,637 次查看
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.)

标签 (1)
0 项奖励
回复
1 解答
1,149 次查看
BrendanDoonan
Contributor III

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

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,149 次查看
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 项奖励
回复
1,150 次查看
BrendanDoonan
Contributor III

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

0 项奖励
回复
1,149 次查看
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 项奖励
回复