cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

acl.DOMOID

samah
1-Newbie

acl.DOMOID

Hi,



We have a .NET application that accesses the Arbortext DOM through the
API. We access nodes in Arbortext using

Epic._Application app = new Epic.ApplicationClass();

Epic.DOMDocument doc = app.ActiveDocument;

Epic.DOMElement el = doc.GetElementById(InstanceID);



But we ran into that some nodes do not have unique ID attributes so
instead we'd like to use a node's OID to retrieve a node, I'm trying to
use.



Epic._Application app = new Epic.ApplicationClass();

Epic.Acl acl = app.Acl;

Epic.IDOMNode Aomtemp = acl.DOMOID("526");



Where "526" is an oid of a node in an open AT document



But I get the exception:



"Error HRESULT E_FAIL has been returned from a call to a COM component."



Can somebody help me with that?



Thanks,



Samah



3 REPLIES 3
samah
1-Newbie
(To:samah)



Hello all,



I figured this out, I was using a wrong oid, it should be Epic.IDOMNode
Aomtemp = acl.DOMOID("(526,1,29)");



Now I have another problem, Arbortext is passing the "oid" to the
external .Net application and then it freezes until the .Net application
shuts down. How can I make Arbortext pass the oid, lunch the .Net
application and regain control and not freeze.



Thanks,



Samah




bibach
1-Newbie
(To:samah)

Samah,

I think we need a little more information about your application. I've gathered that you're invoking it from within Editor, but how are you invoking it? What is your intended mode of interaction? Is it a dialog that is supposed to remain open and continue to interact with the Editor while also allowing the user to interact with the Editor directly?

-Brandon 🙂
samah
1-Newbie
(To:samah)


Brandon,

I figured it out 🙂 Thanks!

Yes. The .Net application is invoked from within editor, the editor
passes the "oid" of a node to the external application then the
application uses acl.DOMOID("oid"); to get the DOM Node. I needed the
editor to pass the oid to the application and stay responsive to other
actions, in the editor when I changed the code that lunch the external
application from Acl.func("system", "C:\\Program
Files\\JMP\\CIT\\InsertionTool.exe " + case_oid); to Acl.func("system",
"C:\\Program Files\\JMP\\CIT\\InsertionTool.exe " + case_oid + "&", 1);

I got the behavior I needed.

Best,

Samah
Top Tags