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.


Topics - Uffe

Pages: 1 ... 16 17 [18] 19 20
256
Hi all,

Something v strange going on here.
I'm generating RTF documents with DocumentGenerator in 1009 on Windows 7/64, and I'm not getting any headers or footers.
If I run the regular GUI RTF generation with the same template on the same element, the header and footer show up as expected.
I've checked the generated RTF files and indeed the one generated by DocumentGenerator lacks {\header} and {\footer}.
Code: [Select]
DocumentGenerator docGen = repository.CreateDocumentGenerator();
docGen.NewDocument("");
docGen.DocumentElement(repository, element, "TestTestTest");
docGen.SaveDocument(fileName, DocumentType.dtRTF);

Any ideas?

Cheers,


/Uffe

257
Automation Interface, Add-Ins and Tools / Information items conveyed
« on: February 27, 2014, 06:48:03 am »
Hi all,


I've got some information flows which all convey a single class.
I'd like to be able to locate all these connectors (ie the reverse of Find Items Conveyed), but I can't find how. It's not part of the regular connector properties and it doesn't seem to be stored in t_connector, t_connectortags, t_connectorconstraints, t_diagramlinks or t_object.

Any clues?

Cheers,


/Uffe

258
Automation Interface, Add-Ins and Tools / Shape script "addin" property
« on: January 29, 2013, 08:20:30 pm »
Hi!

Does anyone have an example of how to use the "addin" property in a shape script?

All I can find in the help file is "addin (value returned from an Add-In)," but it doesn't say anything more on the syntax, nor can I find any hint in the Add-In API reference.

How is it called from the shape script, how is it received in the Add-In and what is the Add-In supposed to return?

Cheers,


/Uffe

259
Automation Interface, Add-Ins and Tools / Directed association in toolbox
« on: December 11, 2013, 03:05:24 am »
Hello all,


In a quick linker definition, I can specify that an association is to be directed from source to target. In a diagram toolbox, on the other hand, I can only specify "Association" and it comes out with direction unspecified.

Is there a way to specify a directed association in a toolbox?


Cheers,


/Uffe

260
Hi all!


I'm working on an RTF template, simple little thing which lists in a table each element's name, author, status and diagram occurrences ("usage").
The diagrams are in a numbered list, the whole list (for each element) in one cell.

My problem is, the numbering in this list carries over between rows and I don't want it to: I want the first diagram in each row to be numbered '1'.

Anyone know how?

Cheers,


/Uffe

261
Hi there!


I want to open EA from inside a stand-alone application (not from an Add-In). I create a Repository, call OpenFile(), then ShowWindow(). EA opens up fine, I can do stuff in the repository, but where are my extensions?

I'm using 10.0.1008 Ultimate, with a single third-party Add-In (one of my own).
The usual MDG Technologies (GML, Publish, etc) are absent from the Extensions menu, and in the Manage Add-Ins dialog, my Add-In has status Error.

Everything works as expected when opening the same repository using the EA application.

I've also tried creating an App object instead of the Repository object, but got the same results - no extensions.

What am I missing?

Cheers,


/Uffe

262
Hi!

I would like the option of having my Add-In open up its help file when the user hits F1 when working with elements or diagrams from an MDG Technology I've created.

This should be doable by adding a context item broadcast event function which identifies the element, package, diagram, attribute, method or connector in focus when F1 was pressed.

The function should return True if the Add-In takes responsibility for the help, False otherwise (like OnContextItemDoubleClicked). To be on the safe side, you could always refrain from firing the event if the context item has a stereotype from one of Sparx' own profiles.

Sound good?

Cheers,


/Uffe

263
Hi all!

I'm working on an MDG Technology for a client where I want to control the creation of instances of Activities which have a stereotype I've defined.

According to the help file, this is controlled using three string parameters in the classifier stereotype; _instanceMode and _instanceOwner, which are used in the "Paste Element" dialog, and _instanceType, which should match the _metatype attribute in the instance stereotype.

I've set up my stereotypes accordingly, one extending Activity and the other CallBehaviorAction -- but the dialog stays the same and the actions are created with the classifier's stereotype.

The exact same setup works for Classes and Objects but, as I say, not for Activities and Actions.

Is this by design, or is it a bug?
Is this still the behavior in EA 10? (I'm on 9.3.933.)
If it is, I'll have to implement a workaround. If not, it'll be fixed when we upgrade.

Cheers,

/Uffe

264
Hi!


I'm working on an Add-In for a client, which on double-click on an element launches an external web browser with the URL taken from the element's "file" list (obviating the need to open the properties dialog, selecting the Files tab and launching the browser from there).

My question is this: is it possible to launch EA's internal web browser instead?
I can't find a function for this in the (9.3) API.


Cheers,

/Uffe

265
Automation Interface, Add-Ins and Tools / EA_ShowHelp
« on: October 24, 2012, 07:05:40 pm »
Hi all,


I'm working on a fairly large Add-In, which comes with its own help file. I'm having trouble getting EA_ShowHelp to work.

My handler for EA_ShowHelp simply opens my help file to the first page - but it never gets triggered, nothing happens.

I've also got a "Help" item in my Add-In's menu, and selecting this menu item does the exact same thing - and that works.
Any ideas?

Cheers,


/Uffe

266
Hi all,


I'm trying to write a script which, given a diagram, creates a new element, moves the diagram into the new element, and moves the elements shown in the diagram into the same new element.

Problem is, the EA.Collection class has no Add() method - just AddNew().
I've tried just setting the ParentID of the diagram to the new element's ID, and deleting it from the package's diagrams collection, but it doesn't seem to work.

It seems to me this is a fairly common need, so does anyone have a script snippet to get it done right?

Cheers,


/Uffe

267
Automation Interface, Add-Ins and Tools / Save Linked Document to File
« on: December 15, 2011, 08:53:12 am »
Hi all,


OK, maybe I'm just being stupid here, but -

I've never had much use for Linked documents before, preferring to keep any generated documents in an external version-control repository.

But now I'm playing around with the create-document-to-artifact feature (new in 9.2), and I'm loving it. Only thing is, I'd like to do both: keep the most recently generated document in EA, and track it in my version-control repository.

So is there a way of dumping a Linked Document to a file?

Cheers,


/Uffe

268
Hi there!


I'm working on an MDG Technology for a client, where I need to create a shape script for an element type which is normally created as a composite.

If it isn't considered proprietary material, does anyone have a script snippet to draw the composite "link" symbol?

Cheers,


/Uffe

269
Automation Interface, Add-Ins and Tools / Set user password?
« on: October 17, 2011, 11:05:13 pm »
Hi all,

I'm wondering if there's a way to set a user's password through the API? I can't find an API call to do it, and the passwords are encrypted when stored in t_secusers.

Cheers,

/Uffe

270
Hi,

I've created a custom Add-In search method, which I call from a Model Search. I want to add this to a Search View under My Views and have the results of the search listed under the corresponding node.

Everything works except the listing of the results in the View; it instead says "Search Found No Items."
When I open the search up in the Model Search window, it returns the correct results. I've done the CLASSTYPE/CLASSGUID magic, so I can open up the results when they are presented in the Model Search result window - but the Model View insists that there are no results.

What am I doing wrong?

Cheers,


/Uffe

Pages: 1 ... 16 17 [18] 19 20