Working with Drafting Views auto placed onto sheets

Hi,

I have a Dynamo file that takes all drafting views from a project and automatically places them on newly created sheets. I am having trouble with the following 2 details:

  1. I am having trouble re-ordering my Drafting View list by name. All views are named by spec section 100-1, 115-2,100-2, 400-5, etc.

  2. How can I control the drafting view title handle on the sheet (Type and location)? ( I just need to move the title down an inch and change the title type.)

Thanks all.

you can get view title by using a method called: Viewport.GetLabelOutline() but there is no way to set that outline. you can set the viewport type by using Viewport.ChangeTypeId(viewporttype.id)

Thanks for the reply Konrad, I will tinker some more and see what I can do. ~ D.

Update: I re-ordered my Drafting View list by Name by: 1. GetName, 2. List.Sort, 3. Write a nested loop to reorder the Drafting View List within my Python Script

Question: If there is an easier way to achieve this, or a more “Pythonic” way, I’d love to know.

Hello Again,

Question number 2 above is still an issue. I can auto create sheets, place the drafting views, but the view title handles are not placed low enough on the sheet. Here is a quick snip:

Thanks for any help on this

~D

There is no API to move the View Title automatically.

What if you try to place the views and then move them a little upwards? According to this thread the view title will not follow the view:

Hi Jeff, all,

I had to do this (and had similar frustrations) when trying to automate sheet production via the API. I also found that, in 2014 at least, the viewport label doesn’t tend to follow along when a parent viewport is moved after being instantiated

Hi Einar,

Thanks for the reply. I believe the title handle follows when the view is moved. Its a good idea I might try.

If I understand your suggestion: 1.) place the views 1-2" lower than normal, 2.) raise the views 1-2", hoping the handles stay.

UPDATE: My current workaround is to duplicate the view title family and move everything down in the family. Not the best but it works on all titles at once.

Would you be willing to share the definition? I’ve got plans to look into this as well and your work would be a great start.

Thanks if so, no worries if no. :wink: