Re: Export import all after a crash

2017-10-22 Thread Chuck Miller via 4D_Tech
Or you could use in error call and simply skip the bad records. I would also 
try opening I. C/S and use sql to fill a me empty data file you can use same on 
error stuff. 

Regards
Chuck 

Sent from my iPhone

> On Oct 22, 2017, at 1:20 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> You may have to write the export method and run it a few times and see where 
> it dies. Keep track of the record number or the loop counter you use when 
> processing the records in the table. Then you patch the export method to jump 
> over the records that cause export problems in each export run. Run the 
> export again and repeat if necessary excluding more damaged records you find.

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

Re: SVG add object question

2017-10-22 Thread Keith Culotta via 4D_Tech
A nice solution!  Just to be sure, it was to use ".svg" rather than "svg"?

$svgPictureRef:=SVG_New_embedded_image 
($svgCopyrightLayer_Ref;$interPicture;5;0;“.svg“)
rather than
$svgPictureRef:=SVG_New_embedded_image 
($svgCopyrightLayer_Ref;$interPicture;5;0;“svg“)


As displayed in the web page:
Next I tried the defined codec-option „svg“
$svgPictureRef:=SVG_New_embedded_image 
($svgCopyrightLayer_Ref;$interPicture;5;0;“svg“)  // appears the same
to no avail.

Finally I checked my manual of the source. Actually codec means extension, ergo 
„.svg“. This line of code
$svgPictureRef:=SVG_New_embedded_image 
($svgCopyrightLayer_Ref;$interPicture;5;0;“svg“)  // appears the same
delivers what I was looking for: 4D renders SVG inside SVG perfectly well.


Keith - CDI

> On Oct 22, 2017, at 3:16 PM, Ortwin Zillgen via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> this works for me
> 
> 
> 
> 
> Regards
> O r t w i n  Z i l l g e n

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

Re: SVG add object question

2017-10-22 Thread Ortwin Zillgen via 4D_Tech
this works for me




Regards
O r t w i n  Z i l l g e n
-
   
 
member of developer-network 

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

Re: Export import all after a crash

2017-10-22 Thread Tim Nevels via 4D_Tech
On Oct 22, 2017, at 2:00 PM, Arnaud de Montard wrote:

> Unbelievable but a customer of mine has always thought that any backup 
> solution was really too expensive. Predictable has occurred, crash, no 
> backup, only a damaged data. I think I'll never understand how people can 
> have such a disregard for their own work (10 years of input, 4 users C/S). 
> Hopefully the cost of repair will make him change his mind…  
> 
> The damaged data can be opened, but MSC says it must be repaired. After 
> repairing "standard" and verification, MSC says "it's OK" but it's not, very 
> strange things happen. 
> 
> The solution to get a workable 4dd is to export all/import all, I think, but 
> my experience of such a situation is near to zero. 
> 
> I tried SQL EXPORT SELECTON to detect what tables have unreadable records in 
> the damaged data, 2 tables (the biggest, of course). 
> 
> • 1st question, where do I export from? The damaged data, or the repaired by 
> MSC one?

You can try both, but you should have better results from the repaired one. 

Try doing MSC standard repair more than one time. Repair and then repair the 
repaired data file. That will sometimes fix super damaged data files. 

Also, if you can’t get a good data file with the advanced “recover by tag” way 
in MSC you really do have big problems. That should fix even the most damaged 
of data files by just skipping over bad records that it encounters. 

> • 2nd question, how to export? A loop through table with SEND RECORD, or SQL 
> EXPORT SELECTION?
> (given that I think I'm able to detect damaged records and ignore them in the 
> exported selections)

I would use SEND RECORD. Particularly if there are BLOB, picture or object 
fields in the record. You can bang out the code in just a few hours. You know 
exactly how to do it. Just a few nested for loops with SEND RECORD, NEXT RECORD 
on the inside. 

You may have to write the export method and run it a few times and see where it 
dies. Keep track of the record number or the loop counter you use when 
processing the records in the table. Then you patch the export method to jump 
over the records that cause export problems in each export run. Run the export 
again and repeat if necessary excluding more damaged records you find. 

Good luck on recovering the data. I’ve been there myself and I know it is no 
fun. Just keep telling yourself “the client is paying me for every hour I’m 
working on this and this whole mess is all his fault anyway.” Without you 
efforts now he would have zero data recovered.

Most people will buy a fire extinguisher after their house burns down. 
Hopefully, your client will be one of those type people and get on an offsite 
backup plan after they pay the bill to fix this mess. 

Tim


Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com


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

Re: Export import all after a crash

2017-10-22 Thread Pat Bensky via 4D_Tech
SQL EXPORT SELECTION will certainly be faster ... and simpler to write ...

Pat

On 22 October 2017 at 11:10, Arnaud de Montard via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Unbelievable but a customer of mine has always thought that any backup
> solution was really too expensive. Predictable has occurred, crash, no
> backup, only a damaged data. I think I'll never understand how people can
> have such a disregard for their own work (10 years of input, 4 users C/S).
> Hopefully the cost of repair will make him change his mind…
>
> The damaged data can be opened, but MSC says it must be repaired. After
> repairing "standard" and verification, MSC says "it's OK" but it's not,
> very strange things happen.
>
> The solution to get a workable 4dd is to export all/import all, I think,
> but my experience of such a situation is near to zero.
>
> I tried SQL EXPORT SELECTON to detect what tables have unreadable records
> in the damaged data, 2 tables (the biggest, of course).
>
> • 1st question, where do I export from? The damaged data, or the repaired
> by MSC one?
>
> • 2nd question, how to export? A loop through table with SEND RECORD, or
> SQL EXPORT SELECTION?
> (given that I think I'm able to detect damaged records and ignore them in
> the exported selections)
>
> TIA,
>
> --
> Arnaud de Montard
>
>
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **




-- 
*
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)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: SVG add object question

2017-10-22 Thread Kirk Brooks via 4D_Tech
Hi Keith,
Huh - that sounds like the problem I'm having. Plus I was thinking the
added document ref would remain valid - like adding an object to a c-obj.
That's not the way it works I know now. Makes sense to get the elements and
just add those. That's more or less what I would up doing anyway.

Thanks for the insight.

On Sun, Oct 22, 2017 at 8:24 AM, Keith Culotta via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> I think I recall a discussion a while back about SVG_Add_object not
> working well when the object being added was another svg document.
> Two svg docs can be "combined" using SVG_ELEMENTS_TO_ARRAYS, and
> SVG_Add_object for each reference in the doc being added.
> This technique doesn't produce a complete merge if doc2 has structures,
> like patterns, that the elements of doc2 depend on.
>
> --
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

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

Re: SVG add object question

2017-10-22 Thread Keith Culotta via 4D_Tech
I think I recall a discussion a while back about SVG_Add_object not working 
well when the object being added was another svg document.
Two svg docs can be "combined" using SVG_ELEMENTS_TO_ARRAYS, and SVG_Add_object 
for each reference in the doc being added.
This technique doesn't produce a complete merge if doc2 has structures, like 
patterns, that the elements of doc2 depend on.

Keith - CDI

> On Oct 21, 2017, at 1:48 PM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I must be confused about how this works. I have some SVG files I want to
> use to create button icons. These are nice, simple, native SVG. I want to
> manipulate them using SVG. I can open a file and export it to a pic
> variable just fine. But I'm not able to put that object into a new svg.
> 
> For example:
> 
> $svgImg:=SVG_Open_file ($path+$aDocs{$n})
> 
> $svg:=SVG_Copy ($svgImg)
> $pic1:=SVG_Export_to_picture ($svg;0)
> SVG_CLEAR ($svg)
> 
> This works as expected.
> 
> $svg:=SVG_New
> $newObj:=SVG_Add_object ($svg;$svgImg)
> $pic2:=SVG_Export_to_picture ($svg;0)
> 
> 
> This doesn't work. $pic2 is blank even though $svg has received the new
> object. I can see that by looking at $svg in the viewer.
> 
> What am I missing here?
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> *The only thing necessary for the triumph of evil is for good men to do
> nothing.*
> 
> *- Edmund Burke*
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: SVG add object question

2017-10-22 Thread Peter Bozek via 4D_Tech
On Sat, Oct 21, 2017 at 8:48 PM, Kirk Brooks via 4D_Tech <
4d_tech@lists.4d.com> wrote:

>
> For example:
>
> $svgImg:=SVG_Open_file ($path+$aDocs{$n})
>
> $svg:=SVG_Copy ($svgImg)
> $pic1:=SVG_Export_to_picture ($svg;0)
> SVG_CLEAR ($svg)
>
> This works as expected.
>
> $svg:=SVG_New
> $newObj:=SVG_Add_object ($svg;$svgImg)
> $pic2:=SVG_Export_to_picture ($svg;0)
>
>
> This doesn't work. $pic2 is blank even though $svg has received the new
> object. I can see that by looking at $svg in the viewer.
>
> What am I missing here?
>

Kirk, I do not have answer as I do not use SVG component to manipulate SVG,
I handle them with XML commands. Note that SVG objects are just XML trees
and can be manipulated with XML  commands. For example, you can use command
DOM EXPORT TO FILE
to export SVG as XML file and explore it in text or XML editor.

In your case, I would guess that $svg is not properly formed as SVG image.

--

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

Re: SVG add object question

2017-10-22 Thread Kirk Brooks via 4D_Tech
Jim,
No, the file is an SVG document made up of XML. SVG_open_picture is what
you're thinking of.

On Sun, Oct 22, 2017 at 2:46 AM, Jim Dorrance via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> You are opening an image, not  xml. You should save the source xml also and
> edit it
>
> On Sat, Oct 21, 2017 at 8:48 PM, Kirk Brooks via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
>
> > I must be confused about how this works. I have some SVG files I want to
> > use to create button icons. These are nice, simple, native SVG. I want to
> > manipulate them using SVG. I can open a file and export it to a pic
> > variable just fine. But I'm not able to put that object into a new svg.
>

-- 
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

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

Export import all after a crash

2017-10-22 Thread Arnaud de Montard via 4D_Tech
Unbelievable but a customer of mine has always thought that any backup solution 
was really too expensive. Predictable has occurred, crash, no backup, only a 
damaged data. I think I'll never understand how people can have such a 
disregard for their own work (10 years of input, 4 users C/S). Hopefully the 
cost of repair will make him change his mind…  

The damaged data can be opened, but MSC says it must be repaired. After 
repairing "standard" and verification, MSC says "it's OK" but it's not, very 
strange things happen. 

The solution to get a workable 4dd is to export all/import all, I think, but my 
experience of such a situation is near to zero. 

I tried SQL EXPORT SELECTON to detect what tables have unreadable records in 
the damaged data, 2 tables (the biggest, of course). 

• 1st question, where do I export from? The damaged data, or the repaired by 
MSC one?

• 2nd question, how to export? A loop through table with SEND RECORD, or SQL 
EXPORT SELECTION?
(given that I think I'm able to detect damaged records and ignore them in the 
exported selections)

TIA, 

-- 
Arnaud de Montard 


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

Re: SVG add object question

2017-10-22 Thread Jim Dorrance via 4D_Tech
You are opening an image, not  xml. You should save the source xml also and
edit it

On Sat, Oct 21, 2017 at 8:48 PM, Kirk Brooks via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> I must be confused about how this works. I have some SVG files I want to
> use to create button icons. These are nice, simple, native SVG. I want to
> manipulate them using SVG. I can open a file and export it to a pic
> variable just fine. But I'm not able to put that object into a new svg.
>
> For example:
>
> $svgImg:=SVG_Open_file ($path+$aDocs{$n})
>
> $svg:=SVG_Copy ($svgImg)
> $pic1:=SVG_Export_to_picture ($svg;0)
> SVG_CLEAR ($svg)
>
> This works as expected.
>
> $svg:=SVG_New
> $newObj:=SVG_Add_object ($svg;$svgImg)
> $pic2:=SVG_Export_to_picture ($svg;0)
>
>
> This doesn't work. $pic2 is blank even though $svg has received the new
> object. I can see that by looking at $svg in the viewer.
>
> What am I missing here?
>
> --
> Kirk Brooks
> San Francisco, CA
> ===
>
> *The only thing necessary for the triumph of evil is for good men to do
> nothing.*
>
> *- Edmund Burke*
> **
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **




-- 
Jim Dorrance
jim.dorra...@gmail.com
4...@dorrance.eu
www.4d.dorrance.eu

PS: If you know of anyone that needs an experienced 4D programmer to add
energy and experience to their team, please let me know. I have
experience in many areas. Reasonable rates. Remote or Paris only.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**