Jump to content
Developer Wiki and Function Reference Links Read more... ×
LarryO

Date function - data structure changed in 2019?

Recommended Posts

Has anyone else noticed that with VW2019 that the separators on the Mac platform have changed from forward slash "/ " to hyphen "-"?

Also Date(2,0); VW2019 generates yy-mm-dd where as VW2013 generated mm/dd/yy on the same MacBook Pro.

Did the function get tweeked to generate the same output regardless of MAC/PC platform?

If so, would have been nice to also make the month and day always generate 2 digits.

PCs generated hyphens and MACs forward slashes. I don't recall it ever being system setting sensitive but it was definitely platform sensitive.

Share this post


Link to post

The Date() procedure has always used the system settings to determine what is displayed. On the odd machine it ignores the system settings, but this is very rare.

Share this post


Link to post

I agree with Julian, I am getting the slashes I expect from my system OS X 10.11

 

Check your System Preferences, Language and Region pane and click the Advanced... button then the Date pane.

 

My guess is that you have your region set to Canada instead of to United States.

Share this post


Link to post

Along with file access, date function limitations were a big incentive to develop python support.  

 

Even if you're not ready to make the jump to python, PythonExecute will let you run python from within vs and take advantage of the date and time functions.  If your script is not encrypted, use Set/GetVSVar to pass data between vs and python.  If it is encrypted, you will have to use the string repository (Rpstr_…) to pass values, which is still fairly easy.

Share this post


Link to post
3 hours ago, Miguel Barrera said:

Are there any examples of how to add python routines into vectorscript?

 

You can find examples under the PythonExecute reference: http://developer.vectorworks.net/index.php/VS:PythonExecute

 

The Begin/EndContext calls allow you to treat each execute call like a new line in the python script, maintaining variable values among lines.

Share this post


Link to post

Thanks Guys, when the office finally gets my new workstation purchased I think I will invest a little more time fixing the script behind the company's titleblock. The Python call sounds like something worth figuring out. Its always been a pain making two subroutines simply because the data arrives differently between MAC & PC's.

 

The next task after this is to hopefully get a few more Unicode character glyphs printing on the new PC's. I'm losing my MAC in the upgrade but gaining VW2019. For some apparent reason boxes, check marks and almost equal were easy to type and print on the MAC but seemingly impossible on a PC running VW2015. check marks would display but never print and I couldn't even get my PC laptop to display almost equal in VW2013 dimensions.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×