Book a Demo

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - nivek

Pages: [1]
1
SCORE! Thank you very much! I had messed with typing it as object but never would have found Variant.

2
Thanks Geert, unfortunately no good that way either. I tried the following
Code: [Select]
Dim repo As EA.Repository
Set repo = App.Repository
Dim el As EA.Element
Set el = repo.GetElementByID(869)
Excel.Cells(12, 2) = el.Notes
repo.ShowInProjectView (el)

I also tried both on a different random configuration of windows, office and EA versions to no avail. :'( gotta love windows

3
thanks q, yes print does work.

Also I have re-created the same issue in word.
To add intrigue I thought I would try the OLE, the following WORKS from DXL within DOORS
Code: [Select]
oleMethod(objRepo, "ShowInProjectView", argBlock, ret)

4
yup, the element is definitely found and populated

5
I have VBA code similar to the following:

Dim App As EA.App
Set App = GetObject(, "EA.App")
Dim el As EA.Element
Set el = App.Repository.GetElementByID(869)
Excel.Cells(1, 1) = el.Notes
App.Repository.ShowInProjectView (el)


this gets the open instance of EA and properly gets notes for the referenced element. Other UI methods work as well like ensureOutputVisible or changing tabs so the connection should be good. However, this gives me an "object does not support this property or method" error. Inside of EA the method works just fine. Has anyone gotten this to work external to EA? Excel specifically?

Thank you very much for any assistance, I must be missing something.


Pages: [1]