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 - avantol13-2

Pages: [1]
1
General Board / Re: Calling built-in EA operations within Add-in
« on: October 21, 2014, 11:10:32 pm »
Awesome. Thanks q.

2
General Board / Calling built-in EA operations within Add-in
« on: October 21, 2014, 05:30:30 am »
How does one call "Code Engineering - Generate Code..." on the currently selected element from within an add-in? Is this even possible or do you have to access those operations from directly inside EA?

Thanks!
Alex

3
Yes! That was it. Thank you!

4
Automation Interface, Add-Ins and Tools / Problem creating packages
« on: November 07, 2014, 02:30:49 am »
I just want to create a package underneath another package.

Code: [Select]
// Get the current package.
EA.Package package = repository.GetTreeSelectedPackage();
            
// Add a new package.
EA.Package newPackage= (EA.Package)repository.Models.AddNew("New Package Name", "Package");
newPackage.ParentID = package.PackageID;
newPackage.Update();

I get a package but it's at the root level and not under the package I have selected in the project browser.

Thanks,
Alex

5
Using the API of course, sorry I wasn't specific.

6
How can I force generation using a specific language? e.g. change the "language" field in package or class properties.

Thanks,
Alex

7
I am able to view the database table within EA by doing what you've said, and I'm looking into how to access that table using C# (attempting to establish a connection to the EA database and whatnot) but I'm having no luck so far. I'm a total newbie with databases (and everything else).

Question q: Does your book detail how to connect to the database using anything other than EA itself? I've looked over the sample, but didn't see anything.

Thanks again for all your help,
Alex

8
"read the underlying table and write time simply formatted as XML to a file"

I'm confused as to what you mean. What underlying table?

9
Awesome, that works, but export does not.

What parameters do I pass in to tell it to export the c code template? Or can I get force the export ref data window to appear to choose what to export?

Is this not possible? How can I work around this, I want to preserve the templates that are there before I import the new ones.

Thanks for all your help, I'm swimming in uncharted waters so I apologize for my ignorance.

Regards,
Alex

10
Repository.CustomCommand("Repository", "ImportRefData", "C:\\originalCodeGenTemplate.xml");

Does not seem to work, EA gives me an error that looks like this:

Error:
Code = 0xc00cs556
Source = Line:1; Char:1
Error Description = Invalid at the top level of the document.

11
Hello all,

I'd like to export the current code generation template for the C language, import a custom template (do some other unrelated stuff), then re-import the original C language template.

I've been digging into the API and have found methods to import files and directories to populate the model, but nothing for this reference data. :( Anyone know where I should be looking in the API?

Thanks,
Alex

Pages: [1]