Snippet Editor Evaluate function or data

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
CermakPOI
Posts: 38
Last visit: Sun Dec 27, 2020 8:53 am

Snippet Editor Evaluate function or data

Post by CermakPOI »

Hi,
I want to create a snippet which inserts the current date and Username in string format - how can i do this with the Powershell Studio snippet editor?

It should look like this

Code: Select all

    1.0.0 01.07.2016  CER Description
<tab>1.0.0<tab>CurrentDate<tab>MyUserName<tab>Description
I already tried variations of this: Product, version and build: Powershell Studio 2016
32 or 64 bit version of product: 64
Operating system:Win7
32 or 64 bit OS: 74
PowerShell Version: 4

User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am

Re: Snippet Editor Evaluate function or data

Post by davidc »

PowerShell Studio has some special variables for the date and the registered product user:

%DATE%
%USERNAME%
%YEAR%
%TIME%

If you want to use the computer user's name or some other dynamic information, you are probably better off using the Custom PrimalSense feature instead:

https://www.sapien.com/blog/2016/02/29/ ... ew-part-1/
David
SAPIEN Technologies, Inc.