Question & Answer
Question
How to add duplicate elements in IBM Rational Rhapsody with JAVA API?
Cause
You might have made true the below property.
General::Model::WarnForDuplicates
Answer
Write one API as follows:
IRPApplication rpy = null;
IRPModelElement ele = null;
IRPProject myapp = null;
rpy = RhapsodyAppServer.getActiveRhapsodyApplication();
myapp = rpy.activeProject();
ele = rpy.getSelectedElement();
myapp.setPropertyValue("General.Model.WarnForDuplicates" ,
"FALSE");//This will set the property as false
ele.setName("package_5");//It will rename the selected element as per the given names. It could be the duplicate name also.
All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
---|
Product Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
swg21984670