Book a Demo

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - George..Brennan

Pages: [1]
1
General Board / Re: can't unlock diagram
« on: January 16, 2023, 10:29:45 pm »
Further....

I exported via xmi to a local file, still locked so it looks like it's local to the model not the PCS server.
I can't see anything in the XML file that says locked.

G.

2
General Board / Re: can't unlock diagram
« on: January 16, 2023, 10:05:18 pm »
Thanks, nice list, unfortunately...

no version control applied yet
no security enabled yet
no one using the API
not using files, we are using a PCS server and back end database
No one is using EaLite

At the moment I'm thinking it may be the PCS server has a lock it hasn't cleared but I don't really want to restart it and lose the evidence.

G.


3
General Board / Re: can't unlock diagram
« on: January 14, 2023, 03:35:00 am »
It has a green border when clicked - presentation mode is off and all other EA apps are offline.

4
General Board / can't unlock diagram
« on: January 13, 2023, 11:19:36 pm »
Hi all,

I have a diagram recently created and now I can't move/edit position info...
The diagram has a grey check against the locked menu which I can't change.
It has a green border when clicked - presentation mode is off and all other EA apps are offline.
There is no lock in t_diagram.

I've raised a support call
Any advice?
Other than copy &  recreate the diagram.

16.1.1622 32bit

George



5
After lot of diagnostic fun and games I reported this, apparently it's a known bug being worked on.
I was importing the Azure Icons and  Images.

Today [29/09/2022] I've heard it should be fixed in the next build of PCS & EA
When builds are made available these are listed on:
https://www.sparxsystems.com/forus/smf/index.php/board,22.0.html

My work around was to bypass the PCS and use a direct database connection to the database.

G.

6
Automation Interface, Add-Ins and Tools / Re: Reverse Engineering SSIS
« on: September 09, 2019, 11:37:08 pm »
Hi Paolo,

SSIS is a pretty complex beast with lots of flow options, what were you thinking of trying to create/map?

Never tried to get the SSIS from the database directly but I have some code somewhere that examines an SSIS project's packages/codebase, I have some code that creates EA objects, just never tried to combine them. ;-)

George.

7
General Board / Re: DDL Import
« on: June 03, 2019, 08:48:10 pm »
I agree and I normally avoid it like the plague but... sometimes organisational constraints means you simply can't avoid it.
So only parse the minimum required.

Over the years a couple of the more irritating things have been...
  'The approvals will take <insert number here> weeks and we need it this week'
  or more bluntly...
  'We use Sql Server, the consultancy looks after the Oracle database and no you can't have access to the 460 tables'
  'We have Db2/AS400 and no you can't have an account'

I've even hacked it into MS Access before now.


8
General Board / Re: DDL Import
« on: May 31, 2019, 07:18:10 pm »
Normally I'd agree but sometimes reading DDL is the only way where security means you simply can not access a production database.

I'm genuinely puzzled as to why you think I'd need parsers for the complete syntax for all supported databases?
Parsers aren't hard, the complexity is in the grammars so I'll extend it as needed....

My use cases were Oracle's then MSSQL's simple Create table syntax for a model so why do more, partitions etc?

9
General Board / Re: DDL Import
« on: May 28, 2019, 08:22:25 pm »
I just been working on developing this MSSQL ddl file import scripting functionality.
Working for create table.

10
Automation Interface, Add-Ins and Tools / Re: Saving/backup vbscripts
« on: October 04, 2018, 11:40:35 pm »
Thanks, Geert,

Just seen this, that's  an impressive and extensive body of code, I'll need time to review it before I can make real use of it - and learn some lessons  ;)

Meanwhile I've been diving in and taking a much less generic view with XML to handle the SQL, works for the moment.

FYI


option explicit

!INC Local Scripts.EAConstants-VBScript
!INC ESFA-ScriptLib.VBS-Utils
'
' Script Name: EA-Utils
' Author:  George Brennan (xxxxxxxxxxxx)
' Purpose: Export VBS scripts from the repository for versioning
' Assumes path of  of "{user}\Documents\VBS-Sparx\"
'
const basePath = "Documents\VBS-Sparx\" '-- root for output files
const dataNodes = "//EADATA//Dataset_0//Data//Row" '-- EA XML Elements
'
const K_GROUP2FOLDER = 0
const K_SCRIPT_FILE = 1
const K_SCRIPT_TEXT = 2
'
const K_DEBUG = true

main
sub main

   '-- prep for outputs
   dim wsh       : Set wsh = CreateObject("WScript.Shell")
    dim fso        : Set fso = CreateObject("Scripting.FileSystemObject")   
   dim userProfile : userProfile = wsh.ExpandEnvironmentStrings( "%userprofile%" )
   dim path       : path = userProfile & "\" & basePath
   dim filePathName
   
    '-- Make an EA repository SQL Call and parse the return set as a DOM tree
    dim SQL
    SQL =    "SELECT g.Script as ScriptGroup, " & _
         "       cast(s.Notes as xml).value('(Script/@Name)[1]', 'varchar(max)') as ScriptName, " & _
         "       s.[Script] " & _
         "  from t_script s " & _
         " inner join t_script g on s.ScriptAuthor = g.ScriptName " & _
         " where cast(s.Notes as xml).value('(Script/@Language)[1]', 'varchar(max)') = 'VBScript' "& _
         " order by g.Script " '-- by target folder
    dim doc : set doc = CreateObject("MSXML2.DOMDocument")
    doc.validateOnParse = False
    doc.async = False
    doc.loadXML(SQLQuery(SQL))

   '-- Traverse the DOMDocument and output each script as a file
    dim rowSet : Set rowSet = doc.selectNodes(dataNodes)
   For Each row In rowSet   
           
      '-- check group folder exists
      If not fso.FolderExists( path & row.childNodes(K_GROUP2FOLDER).text ) Then
         fso.CreateFolder( path & row.childNodes(K_GROUP2FOLDER).text )
      end if
      
      '-- build path/name and write file
      filePathName = path & row.childNodes(K_GROUP2FOLDER).text & "\" & row.childNodes(K_SCRIPT_FILE).text & ".vbs"
      dim oFile : Set oFile = fso.CreateTextFile( filePathName, True)            
      oFile.Write ( "'" & vbNewLine & "'-- exported : " & FormatDateTime(Now, vbGeneralDate) & vbNewLine & "'" & vbNewLine )
      oFile.Write (row.childNodes(K_SCRIPT_TEXT).text)
      oFile.Close    

      if K_DEBUG then Session.output(">> wrote: " & filePathName) end if

    Next 

end sub
'--


George

I wrote a script to do that.

https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library/blob/master/Framework/Tools/Script%20Management/SaveAllScripts.vbs

This way I can manage my scripts in a version control system.

Geert

11
Automation Interface, Add-Ins and Tools / Saving/backup vbscripts
« on: October 04, 2018, 08:52:09 pm »
Currently looking at export/backup user VBS-Scripts from the repository to the file system.
Has anyone tried this?

G.

12
Automation Interface, Add-Ins and Tools / Re: Linked to Element Feature
« on: November 27, 2017, 08:43:54 pm »
Hi Guillaume,

Many thanks, working fine now.

George

13
Automation Interface, Add-Ins and Tools / Linked to Element Feature
« on: November 25, 2017, 12:54:17 am »
VBScripting ( ugh )

Well It looks like I can add a connector between Elements but when I try to use StyleEx to add an atttribute level link such..

   newStyleEx = "LFEP=" & oAttributeSource.AttributeGUID & "L;LFSP=" & oAttributeTarget.AttributeGUID & "R;"               
   'Session.Output("+:" & newStyleEx )
   set oConnector = oSource.Connectors.AddNew ("","Association")
   oConnector.StyleEx = newStyleEx
   oConnector.SupplierID = oTarget.ElementID
   oConnector.update()


everthing looks fine in the database tables but it's not rendering the attribute linkage ends only the relation ship to the element.

Can anyone please tell me what am I missing ?

G.

Pages: [1]