Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: getOverriddenPropertiesByPattern
Topic Summary:
Created On: 5-Dec-2006 16:25
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 5-Dec-2006 16:25
User is offline View Users Profile Print this message


Iain Benson

Posts: 1
Joined: 30-Oct-2006

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.
Report this to a Moderator Report this to a Moderator
 7-Dec-2006 11:06
User is offline View Users Profile Print this message


Simon Morrish

Posts: 127
Joined: 17-May-2005

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 1 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.