Jump to content

Recommended Posts

Hi All,

 

In an effort to learn (and not constantly bug users), can anyone point me towards resources on database string commands?  I have a few worksheets that I want to develop that will require some custom database strings.  I have no problem learning the code to develop them, I just can't seem to find the resources.  I don't have any background in coding but this extended downtime the live events industry is stuck in is a great opportunity to learn.

 

Any help would be greatly appreciated!

 

Thanks.

Share this post


Link to post

More details please. I don't understand what you are asking.

 

By default the only commands for working with strings in worksheets are Substring and Concat.

 

The next step up would be to learn Vectorscript (Pascal) or Python and write Worksheet Scripts. This will give you a lot more control but also be a lot harder to use/edit.

Share this post


Link to post
Posted (edited)

@Pat Stanford 

 

I'm asking for some tips on where I can find resources to learn how to write Substring or Concat.  I appreciate the help I've gotten so far but I'd like to actually learn how to write the strings and WHY they work the way they do.  This will allow me to develop strings in the future independently.

 

I don't want to get super complicated when it comes to using the worksheets after I've developed them.  I'm working a collection of standardized worksheets that will be used by a group of people that don't need to know how they work, just that they work and can be used to complete their tasks.

Edited by rseybert

Share this post


Link to post

I think I have already given you just about everything about SubString.  String, Delimiter, instance that you want.  I just tested if you use more than one character for the delimiter then it treats them as multiple individual delimiters. so a delimiter of /* will split the sting at every / and at every * with a single index for both.  I don't know of a way to actually use a multi-character string as a delimiter. That means I don't know of a way to actually look for /* and only split at locations where both characters are next to each other.

 

Concat is even easier. =Concat('String 1', 'String 2', '*** ', 'String 3').  -> 'String 1String 2*** String 3'

 

In a worksheet any portion of either function can be replaced with a cell reference. [ =Concat(A1,' ',B2,'-',C3)] and you can intersperse cell references and string literals into the same concat function. With Concat you have to manually add spaces between cell references if you need them or include them in one of the string literals.

 

I don't know of any good resources for learning these other than to sit down and play with them.

Share this post


Link to post

@Pat Stanford Yeah, I realize that a lot of the learning process is just putting the time in with trial and error.  I guess I'm just looking for the starting point, learn to walk before you can run.  Looks like you've given me the starting point so I'll go off of that for now.

 

That being said, I think maybe what I'm trying to accomplish with some worksheets cannot be done with database script.  I can get the cells to populate correctly but I would like for them to now combine based on the value of one cell.  For instance, instead of seeing 5 line items that display LOCATION, 0, 0, 1, 1, 0  I would like to see 1 line item that display LOCATION, 0, 0, 5, 5, 0 with a new line item for each LOCATION.  (For that example, the "comma" denotes a separate cell).  See screen shot below of a separate worksheet using records not associated with the Data Cable tool.  

 

Simply "summarizing items" doesn't work and yields cell values of "-" which don't allow for column totals.

 

The results I'm trying to achieve are similar to what the database header returns, the column totals.

 

I'll share a .vwx file with you, since you've expressed interest in the data cables on another thread.  The file will have Data Cables drawn with correct data as well as a worksheet that I've started.  Let me know what your thoughts are.  At this point, this is the last step I need to take to get all of my paperwork to be populated by VW.

 

Thanks again.

Screen Shot 2020-07-18 at 12.15.27 PM.png

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


 

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.

×
×
  • Create New...