Jump to content
Developer Wiki and Function Reference Links ×

Selecting symbols on other sheet layers; copying title block information


Recommended Posts

I've been trying to figure out a way to write a script that will copy title block information from one sheet layer to another.

For this title block, I'm using a symbol on each sheet layer, with a record attached that contains all of the fields that would be copied from one sheet layer to another.

One sheet layer will be the 'source' data, to be copied to the 'destination' sheet layers.

But I can't seem to find a way to select only the instance of the symbol on the 'source' sheet layer to use the GetRField procedure to pick up the values from it.

Any suggestions?

Thanks!

Link to comment

Dan,

Are you using the built in VW Sheet Border/Title Block objects or is this your own symbol?

If not, you might want to take a look if you are using one of the Industry Series (not Fundamentals) products as brugers suggests. They work well and you can set up the title block to have items that are sheet specific and items that are the same across all title blocks in the drawing.

If you really want to use your own symbol, there are any number of ways to specify the two layers. The easiest might be to just click on the title block you want to copy from and get a handle to it and then navigate to and click on the title block you want to copy to.

Another option would be a custom dialog box with two lists of the layers. Pick a layer to copy from in one column and a layer to copy to in the other column.

Or a combination of both.

One way of getting the information on the block to copy from would be to use the FSActLayer command. This returns a handle to the first selected object on the active layer. You would then want to error trap to make sure it is a title block or at least has the record you are concerned with attached.

Let us know if you have more questions.

Link to comment

I'm sorry, I should have been more clear - I'm using a Fundamentals product - Spotlight.

I'm using my own symbol for the border/title block, since it was something that I already had drawn containing the layout of shapes and text fields that works well. I just made a symbol out of all the text fields I wanted to be able to modify, and linked them to appropriate record fields.

Pat, I think I understand what you are suggesting - I will have to play with the code a bit more to figure it out. 8)

Another related line of inquiry that I tried was to do the entire manipulation on a worksheet, by creating a database line that displayed the contents of the record fields for each instance of the record, but I found that I wasn't able to select individual lines in the worksheet(i.e. the line marked 2.1 or 2.2 or 2.3, etc.), only "whole number" lines. Is there such a method, or am I barking up another wrong tree?

Thanks!

Dan

Link to comment

So here's how I ended up implementing this script:

I created a worksheet called "Title Block Info," with one column containing the description of what information goes in each record field, and the next column used for actually entering that information.

Then, used the vectorscript to get a handle to that worksheet, and to the selected title block symbol on the active layer.

Then, the script fills variables with the data from the worksheet, and uses SetRField to set the record fields based on those variables.

This achieves the solution that I was seeking - type the information in only once, and then use the script to fill it into the title block on each page. Just a different approach than my original copy-and-paste idea.

Thanks for the suggestions!

Link to comment

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.

×
×
  • Create New...