Can I made change all detail view to this setup

Can I made change all detail view to this setup

Darkforce_the_ilogic_guy
Advisor Advisor
489 Views
7 Replies
Message 1 of 8

Can I made change all detail view to this setup

Darkforce_the_ilogic_guy
Advisor
Advisor

Can I made change all detail view to this setup with Ilogic code ? I want make remove both the Letter  and add Smooth cutout shape, Full Detail Boundery and Connection Line

 

Darkforce_the_ilogic_guy_1-1698318412946.png

 

Darkforce_the_ilogic_guy_2-1698318430386.png

 

 

 

 

 

 

 

Darkforce_the_ilogic_guy_0-1698318270659.png

 

 

Darkforce_the_ilogic_guy_3-1698318458570.png

 

 

sds

0 Likes
Accepted solutions (2)
490 Views
7 Replies
Replies (7)
Message 2 of 8

WCrihfield
Mentor
Mentor
Accepted solution

Hi @Darkforce_the_ilogic_guy.  You could give this a try.  The one line I'm not sure about is the 'IsBreakLineSmooth' property.  I did not see a property specifically for making the boundary fence smooth or rough.  If that line causes an error, you may have to delete it, and try something different for that setting.

If ThisDoc.Document.DocumentType <> DocumentTypeEnum.kDrawingDocumentObject Then Exit Sub
Dim oDDoc As DrawingDocument = ThisDoc.Document
Dim oSheets = oDDoc.Sheets
For Each oSheet As Sheet In oSheets
	Dim oViews As DrawingViews = oSheet.DrawingViews
	If oViews.Count = 0 Then Continue For
	For Each oView As DrawingView In oViews
		If oView.ViewType <> DrawingViewTypeEnum.kDetailDrawingViewType Then Continue For
		Dim oDetailView As DetailDrawingView = oView
		oDetailView.DisplayConnectionLine = True
		oDetailView.DisplayFullBoundary = True
		oDetailView.ShowLabel = False
		oDetailView.IsBreakLineSmooth = True
	Next 'oView
Next 'oSheet

If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) 👍.

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 3 of 8

Darkforce_the_ilogic_guy
Advisor
Advisor
If ThisDoc.Document.DocumentType <> DocumentTypeEnum.kDrawingDocumentObject Then Exit Sub
Dim oDDoc As DrawingDocument = ThisDoc.Document
Dim oSheets = oDDoc.Sheets



For Each oSheet As Sheet In oSheets
Dim oViews As DrawingViews = oSheet.DrawingViews
	If oViews.Count = 0 Then Continue For
	For Each oView As DrawingView In oViews
		If oView.ViewType <> DrawingViewTypeEnum.kDetailDrawingViewType Then Continue For
		Dim oDetailView As DetailDrawingView = oView
				oDetailView.DisplayFullBoundary = True
				oDetailView.DisplayConnectionLine = True
		oDetailView.ShowLabel = False
	oDetailView.IsBreakLineSmooth = True
	Next 'oView
Next 'oSheet

 

You code did give a error  but I fix it ... you have to take 

 

oDetailView.DisplayFullBoundary = True

 before 

 

oDetailView.DisplayConnectionLine = True

 

but I still missiong one thing I need to delete the Letter on the last one 

 

Darkforce_the_ilogic_guy_0-1698327519834.png

 

If do that with right clcik on it--- select text and delete it all

Darkforce_the_ilogic_guy_1-1698327584175.png

can you add that to the code ?

 

 

Message 4 of 8

WCrihfield
Mentor
Mentor

OK.  How about this tactic.  It attempts to access the detail view's parent view, then turn the visibility of its label off also.  I thought that this might be preferable to deleting the contents of the parent view's label.

If ThisDoc.Document.DocumentType <> DocumentTypeEnum.kDrawingDocumentObject Then Exit Sub
Dim oDDoc As DrawingDocument = ThisDoc.Document
Dim oSheets = oDDoc.Sheets
For Each oSheet As Sheet In oSheets
	Dim oViews As DrawingViews = oSheet.DrawingViews
	If oViews.Count = 0 Then Continue For
	For Each oView As DrawingView In oViews
		If oView.ViewType <> DrawingViewTypeEnum.kDetailDrawingViewType Then Continue For
		Dim oDetailView As DetailDrawingView = oView
		oDetailView.DisplayFullBoundary = True
		oDetailView.DisplayConnectionLine = True
		oDetailView.ShowLabel = False
		oDetailView.IsBreakLineSmooth = True
		If oDetailView.ParentView IsNot Nothing Then
			oDetailView.ParentView.ShowLabel = False
		End If
	Next 'oView
Next 'oSheet

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 5 of 8

Darkforce_the_ilogic_guy
Advisor
Advisor

it does not work . I don´t think you can just turn if of...  I need to delete it. This is how it looks after I run the run .. have not remove the Letter A as you can see

 

Darkforce_the_ilogic_guy_0-1698383930699.png

 

0 Likes
Message 6 of 8

Darkforce_the_ilogic_guy
Advisor
Advisor
Accepted solution

I ended up with this code that works

 

If ThisDoc.Document.DocumentType <> DocumentTypeEnum.kDrawingDocumentObject Then Exit Sub
Dim oDDoc As DrawingDocument = ThisDoc.Document
Dim oSheets = oDDoc.Sheets



For Each oSheet As Sheet In oSheets
Dim oViews As DrawingViews = oSheet.DrawingViews
	If oViews.Count = 0 Then Continue For
	For Each oView As DrawingView In oViews
		If oView.ViewType <> DrawingViewTypeEnum.kDetailDrawingViewType Then Continue For
		Dim oDetailView As DetailDrawingView = oView
		
				oDetailView.DisplayFullBoundary = True
				oDetailView.DisplayConnectionLine = True
		oDetailView.ShowLabel = False
	oDetailView.IsBreakLineSmooth = True
	oDetailView.Name = " "
	Next 'oView
Next 'oSheet
Message 7 of 8

Darkforce_the_ilogic_guy
Advisor
Advisor

Do you how I get it to select Smooth Cutout Shape. My current code fail if It is not select, so I need the code to select is as the first

Darkforce_the_ilogic_guy_0-1699447830606.png

 

0 Likes
Message 8 of 8

WCrihfield
Mentor
Mentor

Hi @Darkforce_the_ilogic_guy.  I thought that was what the following line of code was for:

oDetailView.IsBreakLineSmooth = True

Here is the link to its online help documentation:  DetailDrawingView.IsBreakLineSmooth 

It is a Read/Write Boolean "that gets and sets whether the cut shape of the fence is smooth or jogged."

Maybe that line just needs to be set before one of the other lines of code, I am not sure.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)