SHEET FORMAT CUSTOM PROPERTIES TASK

Hello, need a little guidance with solidworks/PDM. I want to automate two points in PDM ( use as task):

1. Change sheet format as a PDM task.

2. Copy custom properties from template part, or file task. 

Anybody has ideas?  Thank you in advance.

SolidworksApi/macros