PrimalScript snippet Editor question

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
danl65
Posts: 9
Last visit: Wed Feb 11, 2015 8:21 am

PrimalScript snippet Editor question

Post by danl65 »

Hi there, I have a question about using the PrimalScript Editor.

I am trying to figure out the correct way to use the function method. I am trying to create a standard header block to insert for functions. I want it to populate with the a section for summary, arguments, usage, author, date, and version.

Now for the date, I am trying to create a function that will insert the current date into the header.

So first I create a new snippet, get the overall layout saved and then close the snippet. I then edit the snippet which reveals the snippet editor and the ability to add variables to the snippet. So in my header I go the the line that reads:

' @Date: Date() and erase the Date() part.

I then place the cursor in the appropriate place and add a new variable called Date. For the function I add Date()

I first tried this as an object and then as a literal. Both times the results are the same. All that appears in my header block is:

' @Date: $Date$
The date never expands when I insert the header block.

What am I doing wrong here? Thanks for your help.

Regards,
Daniel Lee

User avatar
Alexander Riedel
Posts: 7651
Last visit: Thu Apr 08, 2021 8:57 am
Answers: 2
Been upvoted: 7 times

PrimalScript snippet Editor question

Post by Alexander Riedel »

Hmm, the Snippet Editor is shared between PrimalForms and PrimalScript and the teams didn't talk about what values to expand how. While We lock them into a room so they can sort this out, use this in PrimalScript:

$NAME
$COMPANY
$TIMEDATE
$DATE
$TIME
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
danl65
Posts: 9
Last visit: Wed Feb 11, 2015 8:21 am

PrimalScript snippet Editor question

Post by danl65 »

Thanks Alexander. That works.