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

Pages: 1 [2] 3 4 ... 661
16
Well, out of curiosity I installed V14 and ran the above code. No issues. Object placed at expected. You should check whether you have any add-ins / MDGs running and turn them all off first. If that does not help, try with another empty EA repository. Next step would be a re-installation. If none helps, you should either try to come up with more details or you contact Sparx support.

q.

17
General Board / Re: Bulk Import of Alternative Images
« on: January 18, 2019, 08:31:55 am »
Actually it's quite simple. Create it from EA with export ref data. The pictures are store as base64-encoded blobs. For simplicity use a dummy model with a single picture.

q.

18
No, of course not, because you have an infinite number of possible activities for any non-trivial piece of code. AD's highlight certain runtime periods and you create them for those parts which are more than medium complex. Else you can just stick to plain text.

q.

19
Comes to checking this, but GetDiagramObject is no operation up to V13. Are you using V14? If so, this is probably a bug in a new operation. They never test anything and trust in users to find bug :-(

Here's a sample (pseudo) code (from my Scripting book):
Code: [Select]
dia_obj = diagram.DiagramObjects.AddNew ("l=10;r=110;t=-20;b=-80", "");
  dia_obj.ElementID = element.ElementID;
  dia_obj.Update ();
  Repository.ReloadDiagram (diagram.DiagramID);

Note that coordinates go positive left (0) to right and negative from top (0) to bottom

q.

20
Automation Interface, Add-Ins and Tools / Re: VBScript OpenFileDialog
« on: January 17, 2019, 06:56:59 pm »
Code: [Select]
me is likely a structure. This is example code. Just take a string variable since GetFileNameDialog returns a string (see the help).

q.

21
General Board / Re: EAP-Repair crashed: corrupt EAP-File: Error 3019
« on: January 17, 2019, 05:36:45 am »
Don't work with EAP (aka MS Access) over the network. Just deadly. Go to your latest backup. You don't have a backup? No mercy then :-/

q.

22
Phew. Looks like you put some source in a mixer and looked what comes out.


Code: [Select]
EA.DiagramObject diagram_object = diagram.GetDiagramObjectByID(diagram_object_ID, null);
The operation takes only one argument, the ID.

Code: [Select]
            diagram.DiagramObjects.Refresh();
            Repository.SaveDiagram(diagramID);
            Repository.RefreshModelView(0);
            Repository.ReloadDiagram(diagramID);
            Repository.RefreshOpenDiagrams(true);
            diagram = Repository.GetDiagramByID(diagramID);


Salsa? Why do you load the diagram object? There is no need to save the diagram if you just want to add a diagram object. Maybe you show us just the minimal code where you try to add an object. Btw. I don't see any coordinate being supplied.

q.

23
No, that's not possible. You need to take that out of the MDG/tag definition manually.

q.

24
This is on the wish list since (IIRC) 2003.

q.

25
General Board / Re: Bulk Import of Alternative Images
« on: January 16, 2019, 11:33:41 pm »
You could create a file which is used for reference date ex-/import. Alternatively you can go directly to the database (just store the image as blob).

q.

26
Yes, Geert. You are right. Looking into some of Eve's posts they are signed with Simon. Strange though.

q.

27
Well, that's sort of possible, but a PITA. You can "recurse" to a certain level by looking at the t_package.packageId which points up to the parent package. This way you can write a "fixed recursion" to a certain fixed depth. But besides from that scripting is the way to go. I remember that Geert posted something along these lines. He'll likely drop in this morning.

q.

28
In that case you should report a bug (link below in the Support section). I guess there are still a bunch of bugs hidden in this release.

q.

29
@Eve: just curious whether I have some kind of black out. Never seen you here and you start with +6k posts?

q.

30
It's always a good idea to state the used EA version.

q.

Pages: 1 [2] 3 4 ... 661