Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

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
kent_wold
Enthusiast

Thanks!

This would make sense I think however that orienting by degrees (90,180,270, & 360/0 being the cardinal points?) may be of more use as some sections need to be at an odd angle and not just N, S, E, &W...

Any possible addition of custom arrows attached to the section lines would be very helpful.

I have at the moment the customers section designators setup as 'Symbols' with the designation letter as a prompted entry. It's a crude workaround but it does help.

I can if necessary add the remainder of the reference detailing as other prompted entries but to have that automated would be far more accurate in the long term.

tmuel
Advocate

I apologize for jumping on to an old thread, but I think many will find it valuable. Bob thank you for posting this code, it's so close to what I need, and I've exhausted my other resources. The images that @Anonymous and @brendan.henderson posted, both show exactly what I need. In the Callout Label, I need the Detail and Section View Callouts to show the "other side" location of that same view (not the parent view). When I run "findviewlocation" it modifies the View.Label of the parent and child (which is great, and works very nicely), but it does not write the information to the view Callout. I cannot find a way to access that callout property through the api.

Using the Inventor Event Watcher; I know that when editing the callout on the "definition side" of; Detail, Section and Auxiliary views, it is using the "DrawingViewAppendTextToLetterCtxCmd" command set. Digging a little deeper, I also found some similar commands that seem to be specific to the views type: DrawingViewEditTextOnDetialSectionAnnoCtxCmd, DrawingViewEditTextOnFirstSectionAnnoCtxCmd, DrawingViewEditTextOnSecondSectionAnnoCmd.

 

That is where I hit a wall.


image.png

 

Also, the add-in mentioned earlier does have this exact functionality. The callout side of each of those view types is configurable, so it certainly can be done. Unfortunately, that is not a solution for me. I cannot have our design group dependent on a 3rd party app unless we also own the source code.

Any info to help me make this happen would be greatly appreciated.

-Tim

bobvdd
Alumni

Tim, 

I don't see a fast way either of reaching the detail view text (the letter E in your last screenshot)  through the API.
Was playing with another idea of placing the sheet information in the view label with attached macro that I called labelWithSheetLocations
It makes the label heavy obviously as I have to put all info on a single line. Not sure if you like it but I send it anyway.

 

 

 

 

Sub labelWithSheetLocations()
Dim splitstr() As String
Dim splitstr1() As String
Dim splitstr2() As String
Dim odoc As DrawingDocument
Set odoc = ThisApplication.ActiveDocument
Dim osheet As Sheet
Dim oview As DrawingView
Dim oparentview As DrawingView

'Scan through all sheets and all views and construct the view label
For Each osheet In odoc.Sheets
For Each oview In osheet.DrawingViews
  Set oparentview = oview.ParentView
  If Not (oparentview Is Nothing) Then
     splitstr = Split(oview.Label.Text, " (")
     splitstr1 = Split(oparentview.Parent.Name, ":")
     splitstr2 = Split(oview.Parent.Name, ":")
    
     If splitstr1(1) = splitstr2(1) Then
        oview.Name = splitstr(0)
     Else
        oview.Name = splitstr(0) + " (" + splitstr1(1) + "->" + splitstr2(1) + ")"
     End If
  End If
Next oview
Next osheet
End Sub

 

 

Below is an example of the result of the macro after moving a couple of detail views.

 

Cheers
Bob

bobvdd
Alumni

view labels.png

 

tmuel
Advocate

Hi Bob, thanks for the quick response.

 

This is an interesting approach. I hadn't considered writing to the view name instead of the label. It was a bit overwhelming when I first ran the macro (first image), just too much info in the View Name (but that’s good, just need to tweak it a bit). It's a bit confusing in the section Views, as ours (like most) are currently configured to display "SECTION A-A" (<VIEW>-<VIEW), so if the view name also holds all of that info it's redundant. But, if we format it right this could work well. If we write only the child sheet Index number appended to the View Letter, and then display the parent View Sheet Index and Scale in the "other side" label, as we do now, It looks good. It actually solves another issue that we have now, the macro we have now is run manually and if the sheet number needs to be changed, any additional text that may have been added to the label is overwritten, so users a reluctant to update the labels. This way we could trigger the update automatically and not be concerned about additional label text being lost. I like it (see image 2).

 

I am struggling a bit to see what I would need modify in your code to only append the child sheet number to the View Name.

 

 

image.png

 

The other option I was considering is a view table for any parent views on each sheet that have child views on a different sheet. That would help to minimize the info in the actual view and put it in a standard place on the sheet.

We are redefining some of our standards and this will be a great option to add to our discussion.

 

Thanks again! 

 

Tim

 

 

bobvdd
Alumni

Tim,

If I understand correctly, below picture is what you want for example for a detail view called AA that is spread across sheets 1 and 2

detailaa.png

 

Below code accomplishes this and will also reset the view labels when you bring back parent and child view on the same sheet again. I put the destination sheet between round brackets . So AA(2) instead of AA2, contrary to what you were suggesting. Otherwise the code would start mixing up the regular View1, View2 with AA2. The round brackets give me a way to distinguish the moved views from views that are not moved to other sheets.

 

Sub CrossReferenceViewsAcrossSheets()
Dim splitstr() As String
Dim splitstr1() As String
Dim splitstr2() As String
Dim odoc As DrawingDocument
Set odoc = ThisApplication.ActiveDocument
Dim osheet As Sheet
Dim oview As DrawingView
Dim oparentview As DrawingView
Dim viewName As String
Dim numPos As Integer
 
'Scan through all sheets and all views
For Each osheet In odoc.Sheets
For Each oview In osheet.DrawingViews
  Set oparentview = oview.ParentView
  If Not (oparentview Is Nothing) Then
     If oparentview.Parent.Name <> osheet.Name Then
          'Create the view labels
          splitstr = Split(oview.label.FormattedText, "(from ")
          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
    
           'Set the view name
           splitstr = Split(oview.Name, "(")
           splitstr1 = Split(oparentview.Parent.Name, ":")
           splitstr2 = Split(oview.Parent.Name, ":")
           oview.Name = splitstr(0) + "(" + splitstr2(1) + ")"
      Else  ' reset the view label and view name if parent view and child view are on the same sheet
         splitstr = Split(oview.label.FormattedText, "<Br/>(from ")
         oview.label.FormattedText = splitstr(0) 'view label
         
         splitstr = Split(oview.Name, "(")
         oview.Name = splitstr(0) ' view name
     End If
  End If
Next oview
Next osheet
End Sub

 


Bob

CDWADID
Participant

Great stuff bobvdd!  Thanks!

 

With regard to kent_wold's post "06-26-2019 05:06 AM".  This continues to be an issue for many of us in the community who are hybrids with the architectural world. https://forums.autodesk.com/t5/inventor-ideas/custom-section-marks/idi-p/3804410  It would be GREAT to have a solution to this.

 

Cheers!

bobvdd
Alumni

As of today (8/26/2020) , the current idea has 52 votes

I corrected the link to the related idea that you pointed out and it has received 63 votes so far.

This brings the tally at 115. Hopefully this gives sufficient momentum to be considered for implementation.

Although it should not stop anyone from voting for this idea to increase the chances.

CDWADID
Participant

Much appreciated!

Yijiang.Cai
Autodesk
Status changed to: Accepted

Accepted as [INVGEN-60057]

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

Submit Idea  

Autodesk Design & Make Report