This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20 R7
WP IMPORT STYLE SHEETS

WP IMPORT STYLE SHEETS 


 

WP IMPORT STYLE SHEETS ( targetDoc ; sourceDoc ) 
Parameter Type   Description
targetDoc  Object in 4D Write Pro document to receive style sheets
sourceDoc  Object in 4D Write Pro document to get style sheets from

The WP IMPORT STYLE SHEETS command imports all of the style sheets from the sourceDoc into the targetDoc.

In the targetDoc parameter, pass the 4D Write Pro document that will receive the imported style sheets.

In the sourceDoc parameter, pass the 4D Write Pro document containing the style sheets to import. 

Note: If a style sheet from sourceDoc has the same name as a style sheet in targetDoc, the imported style sheet will overwrite (replace) the style sheet in the targetDoc.

Example  

You want to import a template style sheet and receive a notification with the number for each type of style sheet imported:

 wpArea:=WP New
 $template:=WP Import document("Template.4wp")
 
 WP IMPORT STYLE SHEETS(wpArea;$template)
 
 $nb1:=WP Get style sheets(wpArea;wk type paragraph).length
 $nb2:=WP Get style sheets(wpArea;wk type character).length
 ALERT(String($nb1)+" paragraph style sheet(s) and "+string($nb2)+" character style sheet(s) imported))



See also 

WP DELETE STYLE SHEET
WP Get style sheet
WP Get style sheets
WP New style sheet

 
PROPERTIES 

Product: 4D
Theme: 4D Write Pro Language
Number: 1673

This command can be run in preemptive processes

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v18

 
ARTICLE USAGE

4D Write Pro Reference ( 4D v20 R7)