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: Outputting Matrix Content to Excel
Topic Summary:
Created On: 24-Jul-2006 00:53
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.
Answer This question was answered by Duane Hennessy, on Tuesday, July 25, 2006 6:10 AM

Answer:
You need to extract your file from the Data field within the Files table of the encyclopedia.

The fields to the Files table are:

COLUMN_NAME DATA_TYPE
Data image
Date datetime
Name nvarchar
Type nvarchar

The Data field is of the type image (go figure?!). So I'm conjecturing a bitwise transfer from an ADODB Recordset.

To view all of the tables within the encyclopedia use the following SQL string:
SELECT * FROM INFORMATION_SCHEMA.TABLES

To describe a table's schema the SQL string is:
SELECT
COLUMN_NAME,
DATA_TYPE
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME='<Table name here>'

Hope this helps.
 24-Jul-2006 00:53
User is offline View Users Profile Print this message


Dale Moore

Posts: 23
Joined: 29-Jun-2006

Before I go ahead and write the code myself, does anyone have ideas on how to get SA to output the contents of a Matrix to Excel?  I just want a grid of columns and rows that have the X where they have references to each other.  Just like viewing a Matrix in SA, but I don't want to have to view it in SA.

Thanks.

Dale
Report this to a Moderator Report this to a Moderator
 24-Jul-2006 08:19
User is offline View Users Profile Print this message


Dale Moore

Posts: 23
Joined: 29-Jun-2006

Never mind, I wrote the code myself. I have another question though: Does anyone know how to access the usrmatrix file via VBA now that it seems to have migrated into the database in SA 10.4? I know that I can manually export it to a directory, and I have already created the code to read it, but I want to remove that step and be able to read it directly from the database. What I am trying to achieve is have a macro that pulls up a user form with all the User Matrices in there, and you can select whichever one you want, click a button, and hey presto - an excel version of the matrix. I'm about 95% there - just need to know how to pull the matrix definitions out of the database. Actually, being able to pull ALL of the matrices out, not just the user ones would be great if anyone knows the vba code for that....
Report this to a Moderator Report this to a Moderator
 25-Jul-2006 01:14
User is offline View Users Profile Print this message


Duane Hennessy

Posts: 112
Joined: 18-May-2006

Answer Answer
You need to extract your file from the Data field within the Files table of the encyclopedia.

The fields to the Files table are:

COLUMN_NAME DATA_TYPE
Data image
Date datetime
Name nvarchar
Type nvarchar

The Data field is of the type image (go figure?!). So I'm conjecturing a bitwise transfer from an ADODB Recordset.

To view all of the tables within the encyclopedia use the following SQL string:
SELECT * FROM INFORMATION_SCHEMA.TABLES

To describe a table's schema the SQL string is:
SELECT
COLUMN_NAME,
DATA_TYPE
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME='<Table name here>'

Hope this helps.
Report this to a Moderator Report this to a Moderator
 25-Jul-2006 06:09
User is offline View Users Profile Print this message


Dale Moore

Posts: 23
Joined: 29-Jun-2006

EXCELLENT!!!!!  Thank you so much Duane.  I now have a macro that exports the usrmatrx.xml from the encyclopedia and reads it back into a drop down list on a form.  You can then select which matrix you want, and press a button, and it gets put into excel.


woot!

Thanks again. 
Report this to a Moderator Report this to a Moderator
 26-Sep-2006 03:06
User is offline View Users Profile Print this message


Ian Souchard

Posts: 22
Joined: 28-Feb-2006

Sorry, but why do you want to hack around with SQL when you can simply use the File Manager in the SA Tools menu to export usrmatrx.xml?
Report this to a Moderator Report this to a Moderator
 26-Sep-2006 11:58
User is offline View Users Profile Print this message


Ian Souchard

Posts: 22
Joined: 28-Feb-2006

sorry again, misread the issue - to extract usrmatrx.xml from the database using vba, try ISAIMF SAFileExport - Function SAFileExport(bsFileName As String, bsOutputFilePathName As String) As IMFERRORCODE. As you probably know, the standard matrices are in Matrix.xml in the SA program folder.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic System Architect forum.
There are currently 1 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 1 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.