Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Community
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

detail or section view title show what page the parent view is on & visa versa

detail or section view title show what page the parent view is on & visa versa

I need an added feature to allow drawing detail or section view title show what page the parent view is on.  Also on the parent view to show what page the detail or section view is on.

 

This would be extrememly helpfull when you have a multi page drawing with multiple detail views and cross secitons spread across several different pages.  This would allow someone looking on page 8 for detail F to know where the parent view of detail F is located.  Also the other way around, on a parent view on page 1, has a detail view called out which would show which page the detail view is located.

30 Comments
jasonrecords
Advocate

Has anyone seen a macro or anything else to be able to do this?

Please post info on this if you have seen anything.

bobvdd
Alumni

Jason,


You do know, I hope, that you can use the "Go To ..." context menu in the browser to automatically go from the parent view to the section/detail view on another sheet.

jasonrecords
Advocate

@bobvdd  I know about that, but I need something in the view lable to call out the page number so people looking at the drawing know where the parent view is on.  Then vise-versa, on a parent view, to know what page the detail or cross section view is on.

This is something our manufacturing dept. is asking engineering to have on our drawings, and I would like this to be automated as opposed to entered in manually.

 

This is what you would typically see on an architectural type of draiwng if I remember correctly.

jasonrecords
Advocate

I have solved 1/2 of the problem.

Edit view label.

Select "View Label Properties" and "Parent Sheet Name" and insert as shown in the screenshot below.

Now the detail view which is on page 3, shows in the view label that the parent view comes from page 2.

 

1/2 problem solved screenshot

 

 

Now for the last 1/2 of the problem to show in the parent view to show on what page this cross section detail is shown.

Any way to do this?

Can Autodesk add this feature in to allow this to be done???

parent view, what page is detail shown?

bobvdd
Alumni

Jason,

 

I understand that you want this to work on the prints and not only when you are sitting in front of the screen and have access to the software.

 

Here is a link to a VBA macro called "findviewlocation" that you can import in the VBA editor. 
When you run the macro when you have a drawing open, it will add a string to teh View labels.

 

When a View has a child view on a different sheet, it will add the string "(See sheet x)" to the view label.

When a View has a parent on anotehr sheet, it will add teh string "(From sheet y)" to the view label.

 

You will have to turn on the label visibility of the views of course to see the results. Hopefully this can help you while we are figuring out a better solution in the product.

jasonrecords
Advocate

@bobvdd

thanks, I think this is what I am looking for.  Will try it out to see how it works.

 

thanks!

 

Jason

bobvdd
Alumni

Jason,

 

I made a small change to the code to account for views that have multiple child views. If you have downloaded teh code before, make sure to re-download from the same link .

 

Thanks

Bob

The Inventor developers did a good job here by adding the View Label Prop to the child views, but it's only half the job. As others have stated the parent view (the source) also needs a reference to which sheet the child view is on, but only if the child is on a different sheet to the parent.

 

Ignore that in the below picture I have the parent and children views referencing each other while all on the same sheet. It's the concept that counts. When the parent and child are on the same sheet there doesn't need to be a '(Sh. ?)' reference. But if they were on different sheets there needs to be. I currenly have a 19 sheet IDW set with views up to AV that I have had to go through manually and add in (Sh. ?) to each view label.

 

EDit :- forgot to mention that there are several Add-In's out there that can do this, and the VBA that Bob supplied. So it's completely possible to do, developers Smiley Happy

 

 

view_label_property.png

Anonymous
Not applicable

@bobvdd

 

Hi Bob could you sent that macro on my mail zajackacper@gmail.com because link to your dropbox was been expired and I am interested about that macro.

 

Thank you in advance

Kacper

bobvdd
Alumni

 Kacper,

 

You are a very lucky man that I have the habit to backup most of the macros that I write 🙂

Below is your macro. Just copy and paste the code into the VBA editor.

 

Sub findviewlocation()
Dim splitstr() As String
Dim odoc As DrawingDocument
Set odoc = ThisApplication.ActiveDocument
Dim i As Integer
Dim osheet As Sheet
Dim oview As DrawingView
Dim oparentview As DrawingView
Dim myparentList As Object
Dim myparentsheetList As Object
Dim mychildsheetlist As Object
Set myparentList = CreateObject("System.Collections.Arraylist")
Set myparentsheetList = CreateObject("System.Collections.Arraylist")
Set mychildsheetlist = CreateObject("System.Collections.Arraylist")
 
'Scan through all sheets and all views and construct the origin label
For Each osheet In odoc.Sheets
For Each oview In osheet.DrawingViews
  Set oparentview = oview.ParentView
  'Add view and sheet names to 3 arraylists
  If Not (oparentview Is Nothing) Then
     If oparentview.Parent.Name <> osheet.Name Then
     
     'If view is a child and if parent view is already in list, add name of child to existing node
     Dim alreadyexists As Boolean
     alreadyexists = False
     For i = 0 To myparentList.Count - 1
       If myparentList(i) = oparentview.Name Then
         alreadyexists = True
          If InStr(mychildsheetlist(i), osheet.Name) = 0 Then mychildsheetlist(i) = mychildsheetlist(i) + "," + osheet.Name
       End If
     Next i
    
     'If view is a child and if parent view is not yet in list, add name of child to the list
     If Not alreadyexists Then
        myparentList.Add oparentview.Name
        myparentsheetList.Add oparentview.Parent.Name
        mychildsheetlist.Add osheet.Name
     End If
   
     'Clean up existing labels with references
     splitstr = Split(oview.Label.FormattedText, "(from ")
    
     'Construct the "from" label including line break
     If Right(splitstr(0), 5) = "<Br/>" Then
            oview.Label.FormattedText = splitstr(0) + "(from " + oparentview.Parent.Name + ")"
     Else
            oview.Label.FormattedText = splitstr(0) + "<Br/>" + "(from " + oparentview.Parent.Name + ")"
     End If
    
     End If
  End If
Next oview
Next osheet
 
'Loop through existing parent views to construct the destination label
Dim oparentsheet As Sheet
For i = 0 To myparentList.Count - 1
    Set oparentsheet = odoc.Sheets.Item(myparentsheetList(i))
 
    'Find if view sits on this paryicular sheet
    For Each oview In oparentsheet.DrawingViews
        If oview.Name = myparentList(i) Then
            Set oparentview = oview
        End If
    Next oview
     
    'Clean up existing labels with references
    splitstr = Split(oparentview.Label.FormattedText, "(see ")
    
    'Construct the "see" label including line break
    If (UBound(splitstr) > 0) Then
        oparentview.Label.FormattedText = splitstr(0) + "(see " + mychildsheetlist(i) + ")"
    Else
        oparentview.Label.FormattedText = oparentview.Label.FormattedText + "<Br/>" + "(see " + mychildsheetlist(i) + ")"
    End If
Next i
End Sub

 

Cheers

Bob

Anonymous
Not applicable

Rather that start a new request I will just add an enhancement to jasonrecords' original post. What I have encountered is a combined sheet number and reference location (in reference to the numbers and letters on the border). A view with a parent view on Sheet 3 at C5 would read (3,C5) or (3/C5). Another feature for drawings for parts that require inspection reports would be an itemized list of all dimensions/GD&T callouts that includes the dimension text and the sheet/reference location, and this data should be able to be exported to excel.

Just a couple thoughts guys.

Roy Conrad

bobvdd
Alumni

To your first suggestion of faster ways of finding the parent view on another sheet.
The border letters are kind of difficult to deal with through the API. May I suggest another method?

 

Why not use the View name + Sheet name to locate the parent view on a printout?

view and sheet.png

To obtain this effect, simply change in my code above the two occurrences of string 

"(from " + oparentview.Parent.Name + ")"

to 

"(from " + oparentview.Name + " on " + oparentview.Parent.Name + ")"

 

Anonymous
Not applicable

@bobvdd

 

bobvdd
Alumni

Anton,

 

If you want to shorten the labels, you can of course remove the line breaks (<Br/>) Smiley Wink

To obtain a single line with the exact syntax as shown in your pic, near the end of the macro, replace the line 

 

   oparentview.Label.FormattedText = oparentview.Label.FormattedText + "<Br/>" + "(see " + mychildsheetlist(i) + ")"

 

with 

 

   oparentview.Label.FormattedText = oparentview.Name + " - (" + mychildsheetlist(i) + ")"

 

 

Cheers

Bob

 

 

bretrick30
Advocate

There is an add-in on the app store that does exactly this. Even creates the call-out of the child view location. 

 

View Reference

 

 

bobvdd
Alumni

Great news. Thanks for the tip.

kent_wold
Enthusiast

Also need to be able to customize the arrows ... 

bobvdd
Alumni

Can you be a bit more specific what you mean by that and how it is relevant to this discussion?

Thanks.

kent_wold
Enthusiast

My apologies...

I was pretty short there. 

I have need to not only show the information discussed above but also to use a custom arrow style required by our customers. Not only do we need to show a couple of different styles of sectioning arrows but we also need to reference drawings and other references to be clear. These drawings sometimes cover not only many reference drawings but can also refer to other drawings that are decades old. Our customer has a massive data base of drawings for their operations and need clarity in the references and details without each vendor needing to redraw that which has already be done.

 

One Required Arrow StyleOne Required Arrow StyleSection Designator StyleSection Designator StyleSection Designator with Ref Drawing NumberSection Designator with Ref Drawing Number

bobvdd
Alumni

Understood. This could be accomplished IMO with custom symbols attached to a view, provided that a suitable attachment point can be found in an automatic fashion (thinking here of attaching it in a North, South ,West or East position just outside of a view).

Unfortunately the technique I outlined earlier in the macro uses view labels, not symbols :-(. Different technique.

The custom symbol idea will work but requires a different macro. Any takers?

 

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Autodesk Design & Make Report