Re: 4D Write to 4D Write Pro, Moving and using templates (Was: WR Count equivalent in 4D Write Pro)

2018-06-12 Thread JOHN BAUGHMAN via 4D_Tech
Step 1 should have read "Using WR Count and WR GET PICTURE IN PAGE INFO"


> On Jun 12, 2018, at 11:41 AM, JOHN BAUGHMAN  wrote:
> 
> 1. In 4D Write store the position and dimensions of each anchored picture 
> place holder into a c_object.
>   Using WR Count and WR SELECT PICTURE IN PAGE
> 


John Baughman
1331 Auwaiku Street
Kailua, Hawaii  96734
(808) 262-0328
john...@hawaii.rr.com
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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 Write to 4D Write Pro, Moving and using templates (Was: WR Count equivalent in 4D Write Pro)

2018-06-12 Thread JOHN BAUGHMAN via 4D_Tech
If anyone was following the original thread, the underlying problem was how to 
address Anchored Picture place holders when converting a 4D Write template to 
4D Write Pro. Beyond that, how to populate the place holder pictures when the 
4D Write Pro template is used.

My last post left this problem as undoable in anything prior to v17. I have 
since figured out a way to do it in v16 and thought I would post my solution if 
anyone is in fact interested.

Moving the Template from 4D Write to 4D Write Pro…

1. In 4D Write store the position and dimensions of each anchored 
picture place holder into a c_object.
Using WR Count and WR SELECT PICTURE IN PAGE

2. Copy the 4D Write area to an off screen area and delete all the 
anchored picture placeholders.

3. Convert the off screen area to 4D Write Pro.

4. Using the c_object created in step 1 recreate in the new 4D Write 
Pro are all the anchored picture place holders with WP Add Picture.
Store the picture reference returned by WP Add Picture in the 
c_object created in step 1.

Saving the 4D Write Pro template

1. Store the c_object in the template record.

2. Using the picture references stored in the c_object, delete all the 
anchored picture place holders

3. Save the record

Opening the template in the Template table.

1, Using the saved c_object, recreate all the anchored picture place 
holders with WP Add Picture.
Update the picture references in the c_object with the newly 
created anchored pictures references as returned by WP Add Picture

Adding a 4D Write Pro template in a 4D Write Pro document for a patient in the 
patient table.

1. Using the saved c_object recreate all the anchored picture place 
holders with WP Add Picture.
Update the picture references in the c_object with the newly 
created anchored pictures references as returned by WP Add Picture

2, Using the picture references in the c_object, populate the place 
holder pictures with the photos from the patient record.

Hope this helps anyone struggling with a similar situation.

John



John Baughman
1331 Auwaiku Street
Kailua, Hawaii  96734
(808) 262-0328
john...@hawaii.rr.com

> On Jun 10, 2018, at 9:06 PM, JOHN BAUGHMAN  wrote:
> 
> 
> 
>> On Jun 10, 2018, at 8:37 PM, Keisuke Miyako via 4D_Tech 
>> <4d_tech@lists.4d.com > wrote:
>> 
>> I must say it would be difficult to manipulate an existing anchored image 
>> without Get elements or Get element by id (v17).
> 
> 
> You assumed correctly in that these are anchored pictures. I have discovered 
> as you have pointed out that the reference returned by Add picture is 
> destroyed when the record is unloaded. I think you have confirmed for me that 
> there is no way currently to use picture place holders in a 4D Write Pro 
> template as I did in 4D Write.
> 
> I will give this a bit more thought, but I am about to give up on this part 
> of my attempt to upgrade my client to v16. Since it is way to early to deploy 
> v17, I will have to tell them they will have to wait until we upgrade to v17 
> to move any of their photo templates to Pro or create any new ones. Of course 
> this prevents me from moving them to 64 bit until then as well.
> 
> BTW, another thing I cannot find is any way to provide a means for end users 
> to insert 4D expressions as they can in 4D Write. I could write a dialog for 
> this, but it already exists in 4D so why not provide the same functionality 
> out of the box?
> 
> John
> 
> 
> 
> John Baughman
> 1331 Auwaiku Street
> Kailua, Hawaii  96734
> (808) 262-0328
> john...@hawaii.rr.com 
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**