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 - x_honzi

Pages: [1]
1
Hi,
I've found my problem more complicated but it's solved through database. Thank you anyway, it might be helpful exactly for this problem I've posted.

2
Hi,
I tried for example this everything in same time:

Dim project As EA.Project=MyRepository.GetProjectInterface()
project.ReloadProject()
diagram.DiagramLinks.Refresh()
diagram.DiagramObjects.Refresh()
diagram.Update()
package.Update()
MyRepository.ReloadDiagram(diagram.DiagramID)

And still nothing works. Maybe it's not possible. By the way DiagramLinks.AddNew works somehow I don't know how because it added row with some strange values to database table t_diagramlinks but you know I need to add concrete connector to DiagramLinks that has been added to diagram before and which exists in element.connector collection.

3
Hi,
Could you please someone tell me how to update DiagramLinks when add connector? It is not forwarded to it. In EA GUI it works fine. So there must be called something immediately after adding of connector but I tried several update and refresh methods and nothing worked.

Thank you

4
Hi,
I have similar problem but I still can't find out how make it works. I wanna change package user lock but nothing worked. I tried ReleaseUserLock(), ApplyUserLock() and ApplyGroupLock(...). Everytime it gave me an exception. Problem should be that I wanna change it without proper rights for this package as I'm logged on as different user but strange is that it is possible release lock of another user or group in EA GUI. Why I can do that through EA COM? You' re more familiar with this so is there some way how get just one functional step of code? Just one released lock for just one package? Anybody. It's only mentioned in help file but as I can see there's documented some older version ReleaseLock and nobody knows if it is the same as ReleaseUserLock and if it is still used. So I hope we find some way out.

Have a nice day
Thanks

5
Hi,
I have a little question about that how works VersionControlGetStatus. Just tell me somebody if EA provide flag management check-in/out on its own internally or it's every time retrieved from version control tool?

Thanks

6
Or this way. Thanks for your post. It could be also useful. I think that the base difference between LoadControlledPackage and ImportXMI is in changing/not changing of LastLoadDate or can I get last checked-in version by this and not actual stored xml? Is there really no way to get xml file path from 'Package Control Options' window in EA GUI of specific project file? I mean the way how to set that BasePath from project actual set value and not from code.

Thanks

7
I can try it but now I've tried project.ImportPackageXMI and it seems to work. Where is the difference? This is not big succeed anyway 'Cuz I have to specify path in code which is specified in eap project file. So it is not the best way. Possibly your way could be better but there is a little problem that I have to save changes to xml every time, but It is supposed to be done through EA GUI Package Control otherwise there can occur a collision. By the way is there implemented some method which can compare imported and exported package xml? Even there is no difference between those 2 files, exported xml looks different than imported one which was generated by EA GUI before by using Package Control. There is something additional like creating time and etc.

Thanks

8
Hi,
I tried several conversion function as below. My opinion is that the problem is that package.PackageGUID is only used for object reference identification and finally there is used package.XMLPath but XMLPath contains only relative path (drive and root folder name is missing - because it has been set in project as path from where it everything should be read). Making relative path in XMLPath to absolute by setting XMLPath manually makes also no sense because when you try it in EA GUI after replacing of this string it can't be reloaded because of that as you can find in EA new path: "x:\fold\x:\fold" which is incorrect. So I tried LoadControledPackage("x:\fold" & package.XMLPath) also with brackets "{}" and get no error dialog about that file doesn't exist as I get when try use LoadControledPackage(package.PackageGUID) or LoadControledPackage(project.GUIDtoXML(package.PackageGUID)) but it doesn't work. Nothing has been reloaded. So possibly it should be one of these 2 last functions but reading of EA.Package property member XMLPath is the problem.

Conversion example
packS=package.PackageGUID     '{000-000-000}
project.XMLfromGUID(packS)      'EAID_000_000_000
PackXML=package.XMLPath         'package1.xml
project.GUIDfromXML(packXML)  '{package1.xml}

9
Hi,
Please tell me somebody what is exact prototype of this function. Because in manual is LoadControlledPackage(PackageGUID) but it doesn't want PackageGUID, possibly it could be xml path but It doesn't looks like it works anyway. Should be there some refresh or update method called later? This function should change also Package.LastLoadDate in xml. Am I right? In manual there is also LastLoadDate and LastSaveDate noted as Read and Write property but they're only readable.

Thanks

10
Hi all,
I found strange behavior when I copied diagram to another location with its objects(elements) reference. When finished I found it uses also connectors reference from previous diagram but not right at all. Elements are used more than once overall that project so finally it seems that it uses connector references of each element itself but this information is not stored in diagram as well or yes but there is some private storing function which is externally hidden.
By the way Does anybody know if is there some way how to copy connectors with its specific shape?
Thank you

11
Hi could anyone please explain me what means first method add new parameters? I can't  find it anywhere. This is example from EA help file: "Add and Manage Diagrams". I tried several numbers and found no difference. I've thought that it means some coordinates: (l)eft, (r)ight, (t)op, (b)ottom. It is undocumented or I can't simple find it. What exactly it manage when you wanna include element in diagram by this known code?

v = diagram.DiagramObjects.AddNew("l=200;r=400;t=200;b=600;","")

   v.ElementID = o.ElementID

   v.Update

12
I found the reason. It works. Loop isn't problem. The only problem is that delete method wants index as input argument and ID isn't the same thing. So what helped were 2 indexes. First for element, second for its connector index in an array for each 'for each' loop. So finally after that if statement should be something like that:

Dim el As EA.Element=aaa.Elements.GetAt(incrElem)
el.Connectors.Delete(incrCon)
el.Update()
el.Refresh()

I had exception index out of bounds. So it was because of I forgot set connector increment incrCon to zero for connectors loop every each new entering. By the way its a shame anyway there is impossible attach connectors delete method directly.

13
Hi, could you somebody tell me how to delete existing element connection? I tried several ways and always get an exception. So I don't know. Is deleting those 2 connected elements and adding again back the only way how can I do this? For example this doesn't work:

Dim aaa As EA.Package=pack.Packages.GetByName("xyz")
For Each itemA As EA.Element In aaa.Elements
    For Each itemB As EA.Connector In itemA.Connectors
        If(condition) Then
         aaa.Connectors.DeleteAt(itemB.ConnectorID,true)

         or
         itemB.SupplierID=Nothing
         aaa.Connectors.Refresh

         or
         itemA.Connectors.DeleteAt(itemB.ConnectorID,true)

I tried also incremented value for DeleteAt index instead of itemB.ConnectorID. Nothing works. I need it for automation interface (not add-in). Thanks for your help.

14
Hallo,
I've tried some add-in sample code from this website and now I need to know some way how I can read (in C#) properties (=name of class)of selected class block.

Thanks everyone for reply
Have a nice time
John

Pages: [1]