Get settings via COM Automation

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Get settings via COM Automation

ソリューションへジャンプ
2,638件の閲覧回数
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,150件の閲覧回数
BrendanDoonan
Contributor III

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

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,150件の閲覧回数
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,151件の閲覧回数
BrendanDoonan
Contributor III

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

0 件の賞賛
返信
1,150件の閲覧回数
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 件の賞賛
返信