Author Topic: VisioDB Project - Visio Database Project Releases  (Read 10088 times)

0 Members and 1 Guest are viewing this topic.

cliff50

  • Full Member
  • ***
  • Posts: 206
Re: VisioDB Project - Visio Database Project Releases
« Reply #75 on: December 21, 2019, 07:15:15 PM »
Yacine ..
 attached is the image of the object stencil...

the additional shape data > InstantID  is what I require to be added into the text field section of the original stencil..
Can you describe how to add the extra row into the object stencil in the text field section please.

Cliff

Yacine

  • Hero Member
  • *****
  • Posts: 2698
Re: VisioDB Project - Visio Database Project Releases
« Reply #76 on: January 06, 2020, 10:23:07 AM »
Hello Cliff,Sorry for answering your question so late (2019 ended for me on December 17th  :) ).

So happy new year!

The routine you are looking for is "set_fields" in the module "VisioHelper" in the front-end DB.

Code
Sub set_fields(shape As Object, dataset As String)
   
    Dim DB As DAO.Database
    Dim rs As DAO.Recordset
    Dim strSQL As String
   
    Dim label_ As String
    Dim val_ As String
    Dim typ As Integer
    Dim formt As String
    Dim sortkey_ As String
   
   
    Set DB = CurrentDb
    strSQL = "SELECT * FROM TableDefs WHERE Category = '" & dataset & "' ORDER BY FieldSortKey;"
    Set rs = DB.OpenRecordset(strSQL, dbOpenDynaset)
   
    With rs
        .MoveFirst
       
        Do While Not .EOF
            If !prop_user Then 'True = prop field, else user field
                label_ = Nz(!fieldlabel, !FieldName)
                val_ = Nz(!fieldvalue, "")
                typ = Nz(!fieldtype, 0)
                formt = Nz(!FieldFormat, "")
                sortkey_ = Nz(!fieldSortKey, "")
               
                setPropRow shape, !FieldName, label_, val_, typ, formt, sortkey_
            Else
                setUserRow shape, !FieldName, !fieldvalue
            End If
            .MoveNext
        Loop
    End With
   
End Sub

To run it from within Visio you will obviously need to re-write a couple of lines.

Best regards,
Yacine

cliff50

  • Full Member
  • ***
  • Posts: 206
Re: VisioDB Project - Visio Database Project Releases
« Reply #77 on: January 06, 2020, 02:28:39 PM »
Happy New Year Yacine, :D

Thankyou for your reply !. However, I managed to use a previous method that you posted previously on forum (DisplayProps.vss) to generate a new stencil.

santa's elf has been very busy durch Weihnachten.  :P
The code and along with a GUI is within Visio and the database is now a MySQL backend.

The Brief:
A Visio based Tool that could automate diagrams from a database.
Control the administration of Diagrams within an enterprise.


The loose spec on the current version.

Functionality:
manage an object (add\modify\delete objects on object table)
manage a diagram (add\modify diagram on diagram table)
manage connections between objects (add\delete connection on connection table)

Reports:
search for diagrams that contain an object from a list of objects.
search for diagrams that contain a connection from a list of connections.

Administration:
Date Author stamp on any entry change to diagram table.

attached image shows diagram output.

cheers
Cliff


Yacine

  • Hero Member
  • *****
  • Posts: 2698
Re: VisioDB Project - Visio Database Project Releases
« Reply #78 on: January 07, 2020, 02:09:20 AM »
nice, congrats.
Yacine