![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: getOverriddenPropertiesByPattern Topic Summary: Created On: 5-Dec-2006 16:25 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Does anybody know the syntax for the VBA getOverriddenPropertiesByPattern method on the RPModelElement object? I can't find any mention of it in the documentation, but it would be somewhat useful.
|
|
![]() |
|
![]() |
|
Hi Iain
I don't know a definitive answer, but I have tried to use it with some success in the past. The following code will return all locally overridden properties on the currently selected element: [CODE]Sub testGetOverriddenPropertiesByPattern() Set elt = getSelectedElement For Each prp In elt.getOverriddenPropertiesByPattern("..", 1, 0) msg = msg & prp & vbCrLf Next MsgBox msg End Sub[/CODE] The first argument must have at least two "." characters. Beyond that, full names for subject/metaclass/property can be specified. So to find all overridden properties in the General subject, you could use: [CODE]getOverriddenPropertiesByPattern("General..", 1, 0)[/CODE]or to find all overridden properties for the "Comment" metaclass, regardless of subject, you could use: [CODE]getOverriddenPropertiesByPattern(".Comment.", 1, 0)[/CODE]Originally, I hoped this method might support regular expressions, but no. I then thought it might support simple wildcards (*?) but apparently not. If anyone finds or knows of a way to construct a more sophisticated pattern, please post! Incidentally, the last two arguments are fairly self-explanatory, but for completeness: [list] [*]The second argument ("localyOverridenOnly") is set to 0 to return all overridden properties, or 1 to show only those overridden locally. [*]The third argument ("withDefaultValues") is set to 0 to return overridden properties, or 1 to return all properties, overridden or not! [/list] best regards, Simon ------------------------- Simon Morrish simon.morrish@eu.panasonic.com http://panasonic.co.uk Panasonic ideas for life |
|
![]() |
Telelogic Rhapsody
» Rhapsody Category » Rhapsody
»
getOverriddenPropertiesByPattern
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.