Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic System Architect (steve huntington)
Decrease font size
Increase font size
Topic Title: Filtering Definitions - VBA operations
Topic Summary: Encyclopedia.GetFilteredDefinitions - Filter Criteria
Created On: 10-Oct-2006 16:06
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.
 10-Oct-2006 16:06
User is offline View Users Profile Print this message


Bruno Carvalho

Posts: 4
Joined: 27-Sep-2006

Hi,

I would like to know if it is possible to use the method Encyclopedia.GetFilteredDefinitions(WildCardName, SAType) to obtain definitions filtered by a terminal string?
 
For example:  Get all the definitions ending with "C".

Using GetFilteredDefinitions ("*C", typeNum) won't work.


The opposite case work, as specified. (GetFilteredDefinitions ("C*", SAType)

Could this have to do with the operations under the "Wild Card Search".

Thanks.

Bruno Carvalho,
Portugal

Report this to a Moderator Report this to a Moderator
 12-Oct-2006 12:30
User is offline View Users Profile Print this message


SA Team

Posts: 148
Joined: 18-Nov-2005

I do not believe it is possible to do full wild card searches with GetFilteredDefinitions.
I think it only supports the * at the end.

The reporting system will do more advanced wild card searches - but is less easy to use from VBA.

It might be simpler to get all definitions of the type you want and write a simple loop to find the ones you are interested in.

Thanks
Ian

-------------------------

Senior Software Developer
Telelogic UK Ltd.
Report this to a Moderator Report this to a Moderator
 20-Oct-2006 21:02
User is offline View Users Profile Print this message


Andrea Heithoff

Posts: 33
Joined: 15-Aug-2005

In retrieving all information as you recommend, is there a limit to the number of objects that can be returned?  I have about 1300 definitions of a specific type, and when using the "*" I get no objects.  Using "C*" I get the expected number that begin with C.

If there is a limit, can anyone suggest an alternative for retrieving definitions?

Thanks,
Andrea Heithoff

Report this to a Moderator Report this to a Moderator
 23-Oct-2006 13:58
User is offline View Users Profile Print this message


SA Team

Posts: 4
Joined: 6-Oct-2006

No reason other than the unlikely event of running out of memory. I executed the following code and appear to get reasonable results with lngType set to 0 (wild card type) the  SAObjects collection contains 1435 items. Note that "" and "*" both return all objects of the type specified.

Lee



-------------------------


Senior Software Developer
Telelogic UK Ltd.
Report this to a Moderator Report this to a Moderator
 27-Oct-2006 23:21
User is offline View Users Profile Print this message


Andrea Heithoff

Posts: 33
Joined: 15-Aug-2005

It would seem I have the memory issue you mentioned.  I am using two one-dimensional arrays as global variables, one with 65 items and one with 35 items.  Is the use of these causing the problem?  Or should I be using some kind of a release of variables that point to Excel objects or definitions?

I could really use some help in avoiding the memory problems because without the macro to generate a series of spreadsheets I'm stuck with manually editing the 65*35 reports.
Report this to a Moderator Report this to a Moderator
 30-Oct-2006 15:02
User is offline View Users Profile Print this message


Andrea Heithoff

Posts: 33
Joined: 15-Aug-2005

Just an update to my continuing problem...
I rebooted my server and launched SA, then ran the attached code from the SA VBA Editor.  DEF_SYS is a constant for the definition type, which has 1345 instances in a csv export.

My result is that the saObjs.count = 0.

Even if I alter the code to look for "S*" I have problems--there are 242 items that start with S and I still get a count of 0.

So I tested:  I narrowed down the problem to the items starting with "SC E" and looked in the SQL Entity table.  It turns out that there was an instance of DEF_SYS type that starts with SC E and had a mismatched ILAC value.  Namely, it had something called "System Reader Only" and our group is now called "System Reader".  This conflict caused the definition to be blocked in the browser and broke the getfiltereddefinitions query.

Now that I manually changed the values of ILAC in SQL and refreshed the SA browser, I am able to return all 1300+ instances in one go.

I suppose the lesson here is to take care in changing ILAC settings and user group names.

Edited: 30-Oct-2006 at 17:05 by Andrea Heithoff
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic System Architect forum.
There are currently 0 users logged in.
The most users ever online was 16 on 30-Oct-2008 at 14:46.
There are currently 0 guests browsing this forum, which makes a total of 0 users using this forum.
You have posted 0 messages to this forum. 0 overall.

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