Dylan Shaleen Posted April 13, 2020 Share Posted April 13, 2020 Hello all, I am trying to change how the viewport scale appears on my title block for the sheet. Currently when I update the viewport's scale in sheet data, it shows a scale such as (1:48). I would like it instead to automatically update with (1/4"=1'0"). Is there anyway to change this to where it will update with the viewport scale instead of having to unlink it and manually changing it? Thanks in advance! Quote Link to comment
Vectorworks, Inc Employee Nikolay Zhelyazkov Posted April 14, 2020 Vectorworks, Inc Employee Share Posted April 14, 2020 Hello @Dylan Shaleen, Currently this is not possible. However, there is already an enhancement request for this, so we will look into it. Thanks, Nikolay Zhelyazkov 1 Quote Link to comment
Pat Stanford Posted April 14, 2020 Share Posted April 14, 2020 A work around that may help and keep you from having to edit each sheet individually could be to create a worksheet database. From the Resource Manager, create a worksheet. Right click on a Row Header (I usually start with Row 3 so I can put text about without having to add lines.) Choose Create Report. Set the Basic Criteria at the top of the dialog box to Objects with a Record Sheet Data. In the columns section choose the Sheet data you want to see. I would include at least the Sheet Number, Sheet Title, Size, Total Sheets, and Scale. Either Command Click to select the ones you want and then click the Add >> button or Add>> them one at a time to control the order they are in in the right column. You can also drag in the # column if you need to change the order. Once you have all the Fields you want moved to the right column, click OK. You should now have a list of all of the Title blocks in your drawing showing the data from the fields you have selected. Click into one of the Scale cells that is showing 1:48 and type 1/4"=1' and hit enter. Click back into the cell and Copy the data. Now select all of the other sheets with the same scale and Paste. If you select multiple cells and Paste it should put the data into all of them at the same time. You may want to Sort the database on the Scale so that all the sheets with the same scale are together. You can do something similar to change the Total Sheets for all the layers at the same time. Ask again if this is not clear. 2 Quote Link to comment
Vectorworks, Inc Employee Nikolay Zhelyazkov Posted September 17, 2020 Vectorworks, Inc Employee Share Posted September 17, 2020 Hello @Dylan Shaleen, In VW 2021 if you have a viewport with Drawing label that has architectural scale displayed and you are in imperial units, clicking on the Update Scale button in the Title Block will get you the same scale display as in the Drawing Label. Best Regards, Nikolay Zhelyazkov Quote Link to comment
Dennis Moore Jr. Posted November 2, 2020 Share Posted November 2, 2020 Along the lines of this question. I am able to link sheet data scale to my custom title block. If there a way to link the sheet scale to the title block and allow it to update with out having to go back into the title block manager>sheet data. I would like it to update once I select the new scale via the sheet layer option/drop down. I would like to eliminate some steps. Quote Link to comment
Vectorworks, Inc Employee Nikolay Zhelyazkov Posted November 2, 2020 Vectorworks, Inc Employee Share Posted November 2, 2020 5 hours ago, Dennis Moore Jr. said: Along the lines of this question. I am able to link sheet data scale to my custom title block. If there a way to link the sheet scale to the title block and allow it to update with out having to go back into the title block manager>sheet data. I would like it to update once I select the new scale via the sheet layer option/drop down. I would like to eliminate some steps. - Hello, @Dennis Moore Jr., Currently there is no automatic way to update the scale in the TBB, when you update it in the Sheet Layer. However, if you are changing multiple layers at once, you can update the TBBs at once too from the TBManager. What is more, newly created TBBs automatically get the scale of their Sheet Layer. If you would like to have more automated updating, could you fill in a wishlist item in the wishlist forum? Best Regards, Nikolay Zhelyazkov Quote Link to comment
Neda Roohnia Posted May 5, 2023 Share Posted May 5, 2023 On 4/13/2020 at 12:31 PM, Dylan Shaleen said: Hello all, I am trying to change how the viewport scale appears on my title block for the sheet. Currently when I update the viewport's scale in sheet data, it shows a scale such as (1:48). I would like it instead to automatically update with (1/4"=1'0"). Is there anyway to change this to where it will update with the viewport scale instead of having to unlink it and manually changing it? Thanks in advance! Hi there. There's a Python scrip developed for this with the great help of folks on the forum and I am going to post it in here. import vs # Define a function to list the names of all sheet layers in the current document def list_sheet_layer_names(): layer_names = [] hLayer = vs.FLayer() # Use a while loop and the NextLayer() function to iterate through all the sheet layers in the document while hLayer != None: layer_names.append(hLayer) hLayer = vs.NextLayer(hLayer) # Use a lambda function to filter the list of layer names to only include sheet layers layer_type = lambda x:vs.GetObjectVariableInt(x, 154) layer_names = [vs.GetLName(x) for x in layer_names if layer_type(x) == 2] return layer_names # Define a function to get the handles of all objects in the current document that meet certain criteria def get_objects_from_criteria(criteria): object_handles = [] def get_obj(h): object_handles.append(h) # Use the ForEachObject() function to iterate through all objects in the document and add their handles to the list if they meet the criteria vs.ForEachObject(get_obj, criteria) return object_handles # Define a function to calculate the area of a given object def get_object_area(object): top_left, bot_right = vs.GetBBox(object) length = bot_right[0] - top_left[0] height = top_left[1] - bot_right[1] return length * height def ImpScale(SF): if SF == 12: return "1\"=1'0\"" elif SF == 24: return "1/2\"=1'0\"" elif SF == 32: return "3/8\"=1'0\"" elif SF == 48: return "1/4\"=1'0\"" elif SF == 64: return "3/16\"=1'0\"" elif SF == 96: return "1/8\"=1'0\"" elif SF == 128: return "3/32\"=1'0\"" elif SF == 192: return "1/16\"=1'0\"" elif SF == 384: return "1/32\"=1'0\"" else: return f'1:{SF:.0f}' # Iterate through all sheet layers in the current document for layer in list_sheet_layer_names(): # Define criteria strings to find title blocks and viewports on the current layer titleblock_crit_str = f"(((L='{layer}') & (PON='Title Block Border')))" viewports_crit = f"(((L='{layer}') & (T=VIEWPORT)))" # Use the get_objects_from_criteria() function to get lists of title blocks and viewports on the current layer titleblocks = get_objects_from_criteria(titleblock_crit_str) viewports = get_objects_from_criteria(viewports_crit) # If there is at least one title block and one viewport on the current layer, find the largest viewport and set the scale of the title block to match if all([len(titleblocks)>0, len(viewports)>0]): titleblock = titleblocks[0] # get single first found only vp_area_max = 0.0 vp_largest = None # Iterate through all viewports on the current layer and find the one with the largest area for viewport in viewports: vp_area = get_object_area(viewport) if vp_area > vp_area_max: vp_area_max = vp_area vp_largest = viewport # If a largest viewport is found, set the scale of the title block to match if vp_largest: SF = vs.GetObjectVariableReal(vp_largest, 1003) vs.SetRField(titleblock, 'Title Block Sheet Data', 'Scale', ImpScale(SF)) vs.ResetObject(titleblock) Hope it's not too late! 🙂 Quote Link to comment
Neda Roohnia Posted May 5, 2023 Share Posted May 5, 2023 On 4/13/2020 at 12:31 PM, Dylan Shaleen said: Hello all, I am trying to change how the viewport scale appears on my title block for the sheet. Currently when I update the viewport's scale in sheet data, it shows a scale such as (1:48). I would like it instead to automatically update with (1/4"=1'0"). Is there anyway to change this to where it will update with the viewport scale instead of having to unlink it and manually changing it? Thanks in advance! The script I posted looks for the largest viewport on the sheet layer and updates the titleblock with its scale. Quote Link to comment
Recommended Posts
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.