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 - Wade Brooks

Pages: [1]
1
Thank you, I feeling much better about EA again.  I had tried it leaving the text in the parenthesis, but after seeing your answer I feel dumb again.      Thanks a bunch

2
Suggestions and Requests / add a substitution field for preprocessor MACROS
« on: February 06, 2015, 07:10:35 am »
EA define preprocessors default of replacing with nothing works most of the time. But if you hit macros with arguments, it is not so good.  I would like to be able to specify the substituted value and '//' would be a good choice for most MACROS with arguments.   Just ignoring the MACRO, still leaves the parameter list in the way of the parser.

I hate making changes below to source code:
from:
[size=9]IGNORE_FLAGS("-Weffc++") // Ignore base class 'class PtrQueue' has a non-virtual destructor
template <class T>
[/size]
to:
[size=9]#define EA_UGLY     IGNORE_FLAGS("-Weffc++") // Ignore base class has a non-virtual destructor
EA_UGLY
template <class T>
[/size]


3
Uml Process / representing non-class members functions (C++)
« on: September 27, 2014, 03:45:46 am »
I am using ea to trace from requirements to design and code.  We have some non-member functions (task entries and interrupt handlers) that cannot be registered with the OS with a this pointer.  I need a way to represent these in the model to show requirements allocation.  Any one have suggestions on how to handle these?  

4
Automation Interface, Add-Ins and Tools / Re: Retrieving stacktrace
« on: March 06, 2015, 06:35:12 am »
you can redirect stdout or stderr to a file.


here is an example of stderr:
script --option parameter    2> error.log

The command shell will start "script"   pass options and parameters to the program.    The "2> error.log" would be removed by the shell and error output would be directed into the error.log file

5
I had code that would import packages that did not exist into the model,   But Because you enter the GUID of the parent package to do that I was confused as to what to pass in to replace an existing package.  So if you give GUID of parent it will insert the package but to replace a package you give the GUID of the package itsself,   and the documentation was very unclear on this.   But thanks again you gave me enough of a hint to fix both cases.   Thanks

6
Your answers have been very helpfull before but I think you may of missed on this one.  :'(

ImportPackageXMI(GUID_of_parent_package, xmi_file_name, 1, 1)

produces a copy in the parent package

ImportPackageXMI(GUID_of_package, xmi_file_name, 1, 0) 

overwrites it.   But thanks for trying :)  But your comment was close enough for me to experiment the right way  :) :) :)

7
Automation Interface, Add-Ins and Tools / ImportPackageXMI question
« on: March 06, 2015, 03:26:19 am »
I have been able to insert a package with ImportPackageXMI(GUID_of_parent_package, xmi_file_name, 1, 1)           But I also need to be able to overwrite a package.   What do I pass to ImportPackageXMI to cause it to replace a package, or is a different automation interface used?

8
can the compare xmi to package be run via automation?  I need to be able to check if XMI file matches whats in the model for several hundred XMI files.     I am using version 11 of EA.     If the automation interface does not support this, what is the best way to work around it?

9
I had good luck extending the data stored in requirements by creating an extended_requirement MDG.  

10
I have imported over 1000 .c .cpp .h and .hpp files.   I would like to have an automation pull a list of objects created and the associated source file names.  I have the list of objects ok, but cannot find where the links to files are kept.   I know they are in the model somewhere because clicking on the object opens the files in the view window.    How do you find what file contains what objects?

11
I need to add the data types from <cstdint> to EA C++ data types. I need to do this in many models and some future models.   Is there a way to do this from the API?   of from am XML export/import?  
Thanks for any suggestions on how to automate this!

12
Hello Richard,
 
Thank you for your enquiry.
 
The ImportFile method only returns true or false to indicate success or failure.  In the event that a failure occurs, it does not currently provide any further error information.  We have logged a feature request on your behalf for this capability, but cannot say at this time if/when such a feature may be implemented.
 
Sorry we could not be of more assistance.
 
Best regards,
 
Aaron Bell
Sparx Systems Pty Ltd

13
I am using an automation to import files. Some pass some fail.  when I import from gui I get a system oytout window that says "  I man need to define a language macro"    

Problem is I cant get the error message from the automation interface. Here is my python3 code.

    def import_code(self, pkg_dict_entry):
        """ import code """
        package = self.find_package_by_dictionary_name(pkg_dict_entry)
        package_guid = package.PackageGUID
        dir_path = self.code_path_base + package.Name
        self.log(package_guid, ' ', package.Name, ' ', dir_path)
        for pathname, dirnames, filenames in os.walk(dir_path, True):
            for filename in filenames:
                my_file = pathname.replace('\\', '/') + '/' + filename
                if my_file[-2:] == '.h':
                    self.log('my_file:', my_file)
                    options = 'recurse=1;namespace=0;Synchronize=1'
                    stat = self.ea_project.ImportFile(package_guid,
                                                      'C',
                                                      my_file,
                                                      options)
                    self.log('c file:', str(stat), self.ea_project.GetLastError())
                    self.log('c file:', str(stat), package.GetLastError())
                elif my_file[-4:] == '.hpp':
                    self.log('my_file:', my_file)
                    options = 'recurse=1;Synchronize=1'
                    stat = self.ea_project.ImportFile(package_guid,
                                                      'C++',
                                                      my_file,
                                                      options)
                    self.log('cpp file:', str(stat), self.ea_project.GetLastError())
                    self.log('cpp file:', str(stat), package.GetLastError())
                package.Update()
                package.Packages.Refresh()
                
        
I see stat return true or false but I never see an error message.  What Am I doing wrong?

14
Automation Interface, Add-Ins and Tools / Linking to class member functions
« on: September 18, 2014, 06:38:20 am »
 I have a requirement linked to a class, I then used the  "link to element feature" to link it to a class member.  The automation interface shows it is linked to the class.   How do I find what member function it may be linked to.    And how do you link to a member function inside a class with the automation interface?

15
I have a very similar question. I have a requirement linked to a class, I then used the  "link to element feature" to link it to a class member.  The automation interface shows it is linked to the class.   How do I find what member function it may be linked to.    And how do you link to a member function inside a class with the automation interface?

Pages: [1]