![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Some Troubles with OleAutoObj Topic Summary: Created On: 20-Mar-2007 13:47 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: First I have to thank everybody for all the hints. @Reik: Thank you in particular. You gave the right hint. Now it works. COM Object handling is sometimes a little bit confusing within DXL Best Regards Andreas | |
![]() |
|
Hi all,
first, I want to show you the equivalent and expected results in Python: ------ Py Start ----- [Dbg]>>> Entities = Browser.GetSelectedEntities() [Dbg]>>> Entities.Count 1 [Dbg]>>> Entity = Entities.Item(1) [Dbg]>>> print Entity.Name DOORS00000141 [Dbg]>>> ----- Py End ----- The DXL equivalent looks like this, hopefully without errors ---- DXL Start ---- 79 clear(autoArgs) 80 print "Ents: " oleMethod(Browser, "GetSelectedEntities", autoArgs, AssocEnts) "\n" 81 print "EntCount: " oleGet(AssocEnts, "Count", x) 82 print " " x "\n" 83 clear(autoArgs) 84 put(autoArgs, 1) 85 print "Ent:" oleMethod(AssocEnts, "Item", autoArgs, AssocEnt) "\n" 86 print "Ent.Name:" oleGet(AssocEnt, "Name", strRet) "\n" 87 print strRet "\n" 88 halt ---- DXL End ---- DXL stops with this error message: Ents: EntCount: 1 Ent: OLE failure: Mitglied nicht gefunden. //(Member not found) -R-E- DXL: -I- DXL: execution halted I've tried many ways to reach single objects of the associated entities collection object, but everything went wrong. I've no idea. We are running DOORS 8.1 Best Regards and many thanks in advance Andreas ![]() Edited: 20-Mar-2007 at 15:52 by Lars Johannknecht |
|
![]() |
|
![]() |
|
I took ages getting hold of each table in a Word document in turn, which looks like a very similar problem. The function attached did it for me -- maybe it will help you!
The various contants are: cPropertyTables = "Tables" cPropertyCount = "Count" cMethodItem = "Item" wdAutoFitContent = 1 cMethodAutoFitBehavior = "AutoFitBehaviour" Cheers, Paul. ------------------------- Paul dot Tiplady at TRW dot com TRW Automotive |
|
![]() |
|
![]() |
|
Hi Lars,
I have not read the documentation about the used Browser OLE-object, but may be the selectedEntities object has an Item property instead of an Item method so your code would change into: 85 print "Ent:" oleGet(AssocEnts, "Item", autoArgs, AssocEnt) "\n" I've seen this problem somewhere in MS Office automation but did not remember exactly where. Hope that helps you, Greetings Reik ------------------------- Evosoft GmbH for Siemens Industry Sector Berlin, Germany |
|
![]() |
|
![]() |
|
First I have to thank everybody for all the hints.
@Reik: Thank you in particular. You gave the right hint. Now it works. COM Object handling is sometimes a little bit confusing within DXL Best Regards Andreas |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Some Troubles with OleAutoObj
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.