Tech Tip: Applying IDs to Write Pro elements
PRODUCT: 4D | VERSION: 18 | PLATFORM: Mac & Win
Published On: September 15, 2020
When working with 4D Write Pro it can be useful to be able to quickly access a specific element of the document, especially for larger documents or templates. When an element is added by code it will typically return an object referencing the element, such as with the commands WP New header and WP Add picture, for older items there are other ways to reference the elements using 4D WP commands.
With the object loaded a custom ID name can be assigned to the element. The ID is an attribute that can be accessed from the wk id attribute using WP GET/SET ATTRIBUTES. With a custom ID set the element can be quickly referenced at anytime using WP Get element by ID.