Re: Printing Structure Diagram

2019-03-30 Thread Douglas von Roeder via 4D_Tech
Per other responses, the XML file provides a lot of data about the schema
as well as its graphic representation. SVG is an option or using the Adobe
PDF page description language if you want to write your own software.

One avenue to explore for an off the shelf answer is Excel Software
. They have had a suite of software
engineering applications that work on Mac and Windows since at least the
early 90's. They could well have a product that will inhale an XML document
and display it in a GUI.

I've used their software design tools. They're not cheap but I found them
quite to be worth the price.

--
Douglas von Roeder
949-336-2902


On Sat, Mar 30, 2019 at 5:58 PM Keisuke Miyako via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> you should note that native XSLT is removed in 64-bit
>
> so you need to either use a 32-bit or an alternative solution such as
>
> https://github.com/miyako/console-xsltproc
>
> or
>
> https://github.com/miyako/4d-plugin-xslt
>
> > 2019/03/31 8:29、Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com>のメール:
> > Check this out
> > https://github.com/miyako/4d-utility-structure-to-svg-converter
>
>
>
>
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Printing Structure Diagram

2019-03-30 Thread Keisuke Miyako via 4D_Tech
alternatively,
you create a form with one picture object,
sized to fit your paper size.

you use TRANSFORM PICTURE with the Translate option
which allows you to "trim" the SVG at any location without bitmap resampling 
(which is what happens when you convert to PNG or combine pictures).
you print a page, then TRANSFORM PICTURE + Reset and move to the next region.

> 2019/03/31 9:57、Tim Nevels via 4D_Tech <4d_tech@lists.4d.com>のメール:
> In my example it resulted in 15 image files. The final, big .png image file 
> was 9,006 x 8,110 pixels and 13MB in size.  Then printed at 200% “Tile scale” 
> it created 8 pages on 8.5" x 11” paper — 4 pages by 2 pages .




**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Printing Structure Diagram

2019-03-30 Thread Keisuke Miyako via 4D_Tech
you should note that native XSLT is removed in 64-bit

so you need to either use a 32-bit or an alternative solution such as

https://github.com/miyako/console-xsltproc

or

https://github.com/miyako/4d-plugin-xslt

> 2019/03/31 8:29、Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com>のメール:
> Check this out
> https://github.com/miyako/4d-utility-structure-to-svg-converter




**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Printing Structure Diagram

2019-03-30 Thread Tim Nevels via 4D_Tech
On Mar 30, 2019, at 2:00 PM, roofto...@mac.com wrote:

> We are in the midst of analyzing a very old 4D application. We’d like to 
> print/plot/PDF a structure diagram, in all it’s glory, to hang on the wall.  
> It must represent all structure elements such as Tables, Fields, Relations, 
> Indexes, etc….  I have seen these diagrams for other platforms but I haven’t 
> been successful in extracting such from 4D.  
> 
> Way back in the day I could print a tiled version of the structure from the 
> Structure editor window but that print menu seems to be disabled (at least 
> for me) in current versions of 4D.  Ideally I would like to export the 
> database as xml or JASON and load it into another charting specific 
> application to manipulate and print.  I just need to find the proper 
> application (or 4D component/methods) that can consume the xml/JASON and 
> provide the needed diagrams.
> 
> An example of what I am hoping for can be found in the top image of Vanessa 
> Talbot’s 4D blog entry titled, “Detailed Analysis of Your Database Structure” 
>  Here is the link if it is allowed on the Nug: 
> "https://blog.4d.com/detailed-analysis-database-structure/“  Something, 
> clean, clear, and readable.
> 
> FYI: We are on 4D v16R5 at the moment.  Moving to v17 soon.
> 
> Any help is appreciated!

I’m not aware of anything that can do what you want. You may have to build it 
yourself. 

The structure export to XML provides the coordinates for each table, so you 
could process that with some programming and create an SVG with a bunch of 
boxes representing each table. Then you’d have to fill in all the fields inside 
each box. Not too difficult. The tricky part is drawing the relation lines. All 
the data is there, but drawing lines like you see in the structure window would 
be an interesting challenge. 

I decided to see what it took to create a printed copy of what you see in the 
structure editor. Like what you used to be able to do in previous version of 
4D. I got it done, but it’s a multistep brute-force approach. 

The structure file I was using for this test has all the tables laid out to not 
overlap. Related tables are near the one table so relation lines are readable 
and traceable. If your structure window is a fricking mess with tables piled 
upon each other and relation lines going all over the place, the method below 
will just print out your fricking mess. But if you have an organized structure 
window, here is how you can create a giant image file that you can print out in 
tiles. Grab scissors and glue stick and create your giant printout of your 
structure. 

In my example it resulted in 15 image files. The final, big .png image file was 
9,006 x 8,110 pixels and 13MB in size.  Then printed at 200% “Tile scale” it 
created 8 pages on 8.5" x 11” paper — 4 pages by 2 pages . 

Here are the notes I made to accomplish this:

- Set Structure window background to white
- Right-click in open area and choose “Structure Properties”
- Set “Fill Color” to white
- Capture images of structure
- Open structure window and expand to as big as possible
- Move to top left corner
- Take horizontal band pictures
- Take picture of window (⌘⇧4 then hold down space bar and 
click on structure window)
- Click horizontal scrollbar in the right size “page” area to 
move over 1 full screen page to the right
- Repeat until you have moved horizontal scrollbar all the way 
to the right and taken pictures each time
- Move to top left corner again
- Click vertical scrollbar to move 1 full screen down
- Take horizontal band pictures (see above)
- Repeat going down until you have taken pictures of all of the 
structure window
- Doing it this way you have every image the exact same size. Makes it 
easier to de-tile them and create a single, big image.
- Crop images to remove window frame
- Should be able to create Automator to do this with Acorn, but 
couldn’t get it to work
- I used BatchCrop to do the work
- x = 0, y = 67, width = 4063, height = 1961
- Need to special crop all images in the final column at the right so 
the match previous column
- Need to special crop all images in the final row so they match 
previous row
- Combine images into a single big image with 4D method

C_TEXT($folderPath_t;$fileName_t)
ARRAY TEXT($fileName_at;0)
C_LONGINT($index;$i;$j;$imagesPerRow_l;$numRows_l)
C_PICTURE($emptyImage_c;$rowImage_c;$finalImage_c)

$numRows_l:=5
$imagesPerRow_l:=3

  // folder of structure images
$folderPath_t:=System folder(Desktop)+"cropped"+Folder separator

  // load files names in folder
DOCUMENT LIST($folderPath_t;$fileName_at;Ignore invisible)

  // sort by name
SORT ARRAY($fileName_at;>)

  

Re: Printing Structure Diagram

2019-03-30 Thread Kirk Brooks via 4D_Tech
Hi Kirk,
Check this out
https://github.com/miyako/4d-utility-structure-to-svg-converter


On Sat, Mar 30, 2019 at 1:06 PM rooftop99--- via 4D_Tech <
4d_tech@lists.4d.com> wrote:

>
> Thank you Chip,
>
> I am aware of the xml and html exports.  I have used the xml export for
> several purposes.  My question is, how do I get the printed visual
> structure digram I need using either of these.  Surely there are database
> schema [structure] diagram printing applications out there someplace that
> someone has used successfully.  I am also open to 4D based solutions.
>
> Kirk
>
>
> > On Mar 30, 2019, at 11:54 AM, Chip Scheide <4d_o...@pghrepository.org>
> wrote:
> >
> > I too can not print the structure any more
> >
> > However, there are 2 options I easily found.
> > with the structure window open, select the 'File' menu.
> > - Export -> Structure to xml
> >  and
> > - Export -> Structure to HTML
> >
> > that should get you started.
> >
> > Chip
> >> Hi All,
> >>
> >> We are in the midst of analyzing a very old 4D application. We’d
> >> like to print/plot/PDF a structure diagram, in all it’s glory, to
> >> hang on the wall.  It must represent all structure elements such as
> >> Tables, Fields, Relations, Indexes, etc….  I have seen these
> >> diagrams for other platforms but I haven’t been successful in
> >> extracting such from 4D.
> >>
> >> Way back in the day I could print a tiled version of the structure
> >> from the Structure editor window but that print menu seems to be
> >> disabled (at least for me) in current versions of 4D.  Ideally I
> >> would like to export the database as xml or JASON and load it into
> >> another charting specific application to manipulate and print.  I
> >> just need to find the proper application (or 4D component/methods)
> >> that can consume the xml/JASON and provide the needed diagrams.
> >>
> >> An example of what I am hoping for can be found in the top image of
> >> Vanessa Talbot’s 4D blog entry titled, “Detailed Analysis of Your
> >> Database Structure”  Here is the link if it is allowed on the Nug:
> >> "https://blog.4d.com/detailed-analysis-database-structure/“
> >> Something, clean, clear, and readable.
> >>
> >> FYI: We are on 4D v16R5 at the moment.  Moving to v17 soon.
> >>
> >> Any help is appreciated!
> >>
> >> Thank you!!
> >> Kirk
> >> **
> >> 4D Internet Users Group (4D iNUG)
> >> Archive:  http://lists.4d.com/archives.html
> >> Options: https://lists.4d.com/mailman/options/4d_tech
> >> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> >> **
> > 
> > Hell is other people
> > Jean-Paul Sartre
>
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **



-- 
Kirk Brooks
San Francisco, CA
===

What can be said, can be said clearly,
and what you can’t say, you should shut up about

*Wittgenstein and the Computer *
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Printing Structure Diagram

2019-03-30 Thread rooftop99--- via 4D_Tech

Thank you Chip,

I am aware of the xml and html exports.  I have used the xml export for several 
purposes.  My question is, how do I get the printed visual structure digram I 
need using either of these.  Surely there are database schema [structure] 
diagram printing applications out there someplace that someone has used 
successfully.  I am also open to 4D based solutions.

Kirk


> On Mar 30, 2019, at 11:54 AM, Chip Scheide <4d_o...@pghrepository.org> wrote:
> 
> I too can not print the structure any more
> 
> However, there are 2 options I easily found.
> with the structure window open, select the 'File' menu.
> - Export -> Structure to xml
>  and
> - Export -> Structure to HTML
> 
> that should get you started.
> 
> Chip
>> Hi All,
>> 
>> We are in the midst of analyzing a very old 4D application. We’d 
>> like to print/plot/PDF a structure diagram, in all it’s glory, to 
>> hang on the wall.  It must represent all structure elements such as 
>> Tables, Fields, Relations, Indexes, etc….  I have seen these 
>> diagrams for other platforms but I haven’t been successful in 
>> extracting such from 4D.  
>> 
>> Way back in the day I could print a tiled version of the structure 
>> from the Structure editor window but that print menu seems to be 
>> disabled (at least for me) in current versions of 4D.  Ideally I 
>> would like to export the database as xml or JASON and load it into 
>> another charting specific application to manipulate and print.  I 
>> just need to find the proper application (or 4D component/methods) 
>> that can consume the xml/JASON and provide the needed diagrams.
>> 
>> An example of what I am hoping for can be found in the top image of 
>> Vanessa Talbot’s 4D blog entry titled, “Detailed Analysis of Your 
>> Database Structure”  Here is the link if it is allowed on the Nug: 
>> "https://blog.4d.com/detailed-analysis-database-structure/“  
>> Something, clean, clear, and readable.
>> 
>> FYI: We are on 4D v16R5 at the moment.  Moving to v17 soon.
>> 
>> Any help is appreciated!
>> 
>> Thank you!!
>> Kirk
>> **
>> 4D Internet Users Group (4D iNUG)
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> 
> Hell is other people 
> Jean-Paul Sartre

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Printing Structure Diagram

2019-03-30 Thread Chip Scheide via 4D_Tech
I too can not print the structure any more

However, there are 2 options I easily found.
with the structure window open, select the 'File' menu.
 - Export -> Structure to xml
  and
- Export -> Structure to HTML

that should get you started.

Chip
> Hi All,
> 
> We are in the midst of analyzing a very old 4D application. We’d 
> like to print/plot/PDF a structure diagram, in all it’s glory, to 
> hang on the wall.  It must represent all structure elements such as 
> Tables, Fields, Relations, Indexes, etc….  I have seen these 
> diagrams for other platforms but I haven’t been successful in 
> extracting such from 4D.  
> 
> Way back in the day I could print a tiled version of the structure 
> from the Structure editor window but that print menu seems to be 
> disabled (at least for me) in current versions of 4D.  Ideally I 
> would like to export the database as xml or JASON and load it into 
> another charting specific application to manipulate and print.  I 
> just need to find the proper application (or 4D component/methods) 
> that can consume the xml/JASON and provide the needed diagrams.
> 
> An example of what I am hoping for can be found in the top image of 
> Vanessa Talbot’s 4D blog entry titled, “Detailed Analysis of Your 
> Database Structure”  Here is the link if it is allowed on the Nug: 
> "https://blog.4d.com/detailed-analysis-database-structure/“  
> Something, clean, clear, and readable.
> 
> FYI: We are on 4D v16R5 at the moment.  Moving to v17 soon.
> 
> Any help is appreciated!
> 
> Thank you!!
> Kirk
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

Hell is other people 
 Jean-Paul Sartre
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Printing Structure Diagram

2019-03-30 Thread rooftop99--- via 4D_Tech
Hi All,

We are in the midst of analyzing a very old 4D application. We’d like to 
print/plot/PDF a structure diagram, in all it’s glory, to hang on the wall.  It 
must represent all structure elements such as Tables, Fields, Relations, 
Indexes, etc….  I have seen these diagrams for other platforms but I haven’t 
been successful in extracting such from 4D.  

Way back in the day I could print a tiled version of the structure from the 
Structure editor window but that print menu seems to be disabled (at least for 
me) in current versions of 4D.  Ideally I would like to export the database as 
xml or JASON and load it into another charting specific application to 
manipulate and print.  I just need to find the proper application (or 4D 
component/methods) that can consume the xml/JASON and provide the needed 
diagrams.

An example of what I am hoping for can be found in the top image of Vanessa 
Talbot’s 4D blog entry titled, “Detailed Analysis of Your Database Structure”  
Here is the link if it is allowed on the Nug: 
"https://blog.4d.com/detailed-analysis-database-structure/“  Something, clean, 
clear, and readable.

FYI: We are on 4D v16R5 at the moment.  Moving to v17 soon.

Any help is appreciated!

Thank you!!
Kirk
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Setting background colour for ListBox header buttons

2019-03-30 Thread Pat Bensky via 4D_Tech
Using v17:
I want to set the background colours of listbox headers according to what
type of data is in the column.
So if it's the key field, for example, I want black text on a green
background. Otherwise, I want yellow text on a red background. Here's my
code:

*Case of*

*:* ($isKey)

$ColorNumber:=-(Black+(256*Green))

*Else*

$ColorNumber:=-(Yellow+(256*Red))

*End case*

*OBJECT SET COLOR*($pHeaderButton->;$ColorNumber)

What i get is either black or yellow text, but the background is always
white.

How do I get the background colour to work?

Pat

-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Securing sensitive data in a 4D data file

2019-03-30 Thread Chip Scheide via 4D_Tech
I have just finished(?) a project which will contain sensitive information.
I have been trying to make sure that the sensitive data is protected.

When running the disk the data is on will be encrypted, and I will turn on 
encrypted data communication between 4D client and server. Data encryption in 
the 4D system is done with 2048 size key pairs.

To this end - to protect the sensitive data, I am asking 3 hypothetical 
questions regarding nefarious attempts to access the data.

1 - given a **ONLY** a 4D data file, with only the knowledge that the data you 
want is encrypted inside the data file:
How do you go about accessing  in some usable manner (decrypting) the encrypted 
data?

2 - given the datafile in 1 above **AND** a compiled copy of the structure, You 
do NOT know any (4D password system) user passwords:
what do you do in addition to and/or differently from above?

3 - given # 2 above, and you know 1 user level (no access to design or 'user' 
modes) access password (yours):
what do you do in addition to and/or differently from above?

for #2 and #3
- When using the system, you are only able to see records belonging to you.
- If by some chance you got access to a different user's record(s), under your 
login, there is code in place to reject viewing the record details, and the 
information you want (encrypted data) is NOT visible in the record listing(s).

Thanks for playing along.
I hope I have thought of everything.  :)

Chip


Hell is other people 
 Jean-Paul Sartre
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**