Jump to content
alan_e

linking text with a worksheet value

Recommended Posts

hello, 

 

i'm trying to link a text field with a worksheet's cell value, is this somehow possible?

thank you all!

 

alan

Share this post


Link to post

This will only work if the text is part of a Symbol.

 

Create a custom record format with a text field.

 

Create a block of text and make it a symbol. Edit the Symbol and select the text block. Choose Link Text To Record from the Modify menu. Choose your record and field.

 

Create a worksheet. Select a row (I alway start at Row 3 in case I want to add headers later) and rich click on the row Header.  Choose Database. From the Edit Criteria dialog box choose Record   "YourRecord"  is Present.  You should end up with the same number of subrows as you have YourText symbol instances.

 

In any column enter a formula of "=YourRecord.YourField"  If you used spaces in either the Record or Field names, you will need to use single quotes around each name.  Hit Enter. You should now see the text from each symbol instance. Click in the subrow (3.1, 3.2, etc) in the cell that has the data and edit the data. The changed data will show up on the drawing in place of the original text.

 

Ask again if you need more clarity.  Also check the Help for Link Text to Record, Worksheet Databases, and Records and Fields.

 

  • Like 2

Share this post


Link to post
On 4/15/2019 at 5:05 PM, Pat Stanford said:

This will only work if the text is part of a Symbol.

 

Create a custom record format with a text field.

 

Create a block of text and make it a symbol. Edit the Symbol and select the text block. Choose Link Text To Record from the Modify menu. Choose your record and field.

 

Create a worksheet. Select a row (I alway start at Row 3 in case I want to add headers later) and rich click on the row Header.  Choose Database. From the Edit Criteria dialog box choose Record   "YourRecord"  is Present.  You should end up with the same number of subrows as you have YourText symbol instances.

 

In any column enter a formula of "=YourRecord.YourField"  If you used spaces in either the Record or Field names, you will need to use single quotes around each name.  Hit Enter. You should now see the text from each symbol instance. Click in the subrow (3.1, 3.2, etc) in the cell that has the data and edit the data. The changed data will show up on the drawing in place of the original text.

 

Ask again if you need more clarity.  Also check the Help for Link Text to Record, Worksheet Databases, and Records and Fields.

 

@Pat Stanford how can one read a value from a database and get that value into a Text field?

Share this post


Link to post

I'd like the count values of a database to be shown in a text field. For example, I'd like a text field to show the cell value of row 2.7 and column D from the database.  

Captura de Pantalla 2019-12-27 a la(s) 16.51.40.png

Edited by martinfdc

Share this post


Link to post
1 minute ago, Peter Vandewalle said:

What you’re trying to do can’t be done. A spreadsheet reads objects in the drawing, not the other way round.

Many thanks for your answer. Now I can stop trying.

Share this post


Link to post

As @Peter Vandewalle says, that is basically the reverse of what a worksheet does. And there is not simple, built-in way to accomplish it. Especially since you are using summarized rows.

 

Is it "random" which row you need or is it always the same prefix and number? What are you going to do with the data in this Text Field? Do you just mean a cell in a worksheet? Or stored into a record attached to an object.

It is probably possible to write a script that will accomplish the data transfer you are looking for. It is just a matter of how much you need it. I am thinking using three fields, One to enter the prefix, one for the ID Number, and the third to return the value. That way you could enter different prefix and ID and get different results.

 

Without knowing exactly what you are trying to do I would estimate at least 5 to 10 hours of scripting time after getting complete and explicit on the fields you need to do. Is this an important enough task that you do frequently enough to make it work asking a stranger to spend that kind of time to help you out? 😉

  • Love 1

Share this post


Link to post

Many thanks for you reply @Pat Stanford. I can find other ways to solve the issue I'm having. Actually it's not really a problem, I just thought there was a quick and easy way. There is absolutely no need for anyone to help me and spend so much time creating the script!

 

 

Edited by martinfdc

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...