![]() |
Telelogic System Architect (steve huntington) | ![]() |
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 |
![]() |
![]()
|
![]() |
|
Hi, |
|
![]() |
|
![]() |
|
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. |
|
![]() |
|
![]() |
|
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. |
|
![]() |
|
![]() |
|
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. ------------------------- Senior Software Developer Telelogic UK Ltd. |
|
![]() |
|
![]() |
|
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. |
|
![]() |
|
![]() |
|
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 |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.