Hello Mansour
Yes, using ringpm install uuid will install the extension including the required uuid.ring file
Now I get this error
B:\RingWork\Packages\stzlib\libraries\stzlib>ring stzlib.ring
Line 76 Error (R35) : Can't create/open the file
In read() in file B:\RingWork\Packages\stzlib\libraries\stzlib\base\data/stzunicodedata.ring
Which requires changing
$cUnicodeData = read("../data/unicodedata.txt")
To
$cUnicodeData = read("base/data/unicodedata.txt")
Since I am using test programs next to stzlib.ring (In the same folder)
And when I run one of my test programs
I get the next error
B:\RingWork\Packages\stzlib\libraries\stzlib>ring mytest.ring
Line 2916 Output file 'output\diagram_2019.svg' not created. Log: The system cannot find the drive specified.
In raise() In function stzraise() in file B:\RingWork\Packages\stzlib\libraries\stzlib\base\common/stzfuncs.ring
Called from line 95 In method execute() in file B:\RingWork\Packages\stzlib\libraries\stzlib\base\extercode/stzdotcode.ring
Called from line 124 In method executeandview() in file B:\RingWork\Packages\stzlib\libraries\stzlib\base\extercode/stzdotcode.ring
Called from line 1602 In method view() in file B:\RingWork\Packages\stzlib\libraries\stzlib\base\graph/stzdiagram.ring
Called from line 25 in file mytest.ring
Which is fixed by changing
@cDotPath = "D:\Graphviz\bin\dot.exe"
In stzDotCode class to the next path (to match the folder on my machine)
@cDotPath = "C:\PL\Graphviz\bin\dot.exe"
Now I can run the next test program
load "stzlib.ring"
oOrg = new stzOrgChart("Basic_Hierarchy")
oOrg {
SetLayout("TD")
# Add executive position
AddExecutivePositionXT(:ceo, "CEO") # ceo is the ID of the node and CEO it's label
# Add management positions
AddManagementPositionXT(:vp_sales, "VP Sales")
AddManagementPositionXT(:vp_eng, "VP Engineering")
# Set reporting lines
ReportsTo(:vp_sales, :ceo)
ReportsTo(:vp_eng, :ceo)
# Add staff positions with attributes
AddStaffPositionXTT(:sales_rep1, "Sales Rep 1", [:region = "North"])
AddStaffPositionXTT(:dev1, "Developer 1", [:skill = "Backend"])
ReportsTo(:sales_rep1, :vp_sales)
ReportsTo(:dev1, :vp_eng)
View()
}
Which produce this graph
Summary:
StzLib need a way to configure the library and determine the path for related tools like "C:\PL\Graphviz\bin\dot.exe"
Also, the path used by read() for $cUnicodeData variable
This could be done using global variables or one global list that StzLib can check/use if the values are not empty
aStzLibConfig = [
:DotPath = "C:\PL\Graphviz\bin\dot.exe",
:UnicodeDataFolder = "base/data"
]
Note: some other tests no longer work and produce the next error
* Error (R3) : Calling Function without definition: viewbydepartment
* Error (R3) : Calling Function without definition: addanalysislayer
Greetings,
Mahmoud