Change drawing views styles back and forth from 'Hidden lines' to 'Hidden lines removed'.

Change drawing views styles back and forth from 'Hidden lines' to 'Hidden lines removed'.

sbulowPFMJG
Contributor Contributor
359 Views
1 Reply
Message 1 of 2

Change drawing views styles back and forth from 'Hidden lines' to 'Hidden lines removed'.

sbulowPFMJG
Contributor
Contributor

I have some code which does two things:

1) first generates me a stack of DXF's from all the sheets in my drawing.

  • a) For this to work, I need the hidden lines removed. I've tried simply toggling the visibility of the hidden lines, but they still end up exporting and causing trouble down the line. 

2) Exports a stack of screen captured images which need to have the hidden lines active. 

 

sbulowPFMJG_1-1668629631484.png

What I was thinking, was rather than toggle the visibility, I could just toggle the view style. Is this possible? Does anyone know the command for this?

If there is a command for excluding certain layers from exporting during the dxf generation, that should also solve my problem. Im using the 'DXFAddIN' to generate the dxf's.

 

Thanks in advance for any help

 

0 Likes
Accepted solutions (1)
360 Views
1 Reply
Reply (1)
Message 2 of 2

sbulowPFMJG
Contributor
Contributor
Accepted solution

Found the solution. 

 

	For Each oSheet In oDrawing.Sheets																	'loops though all sheets
		oSheet.Activate
		Dim G = ActiveSheet.DrawingViews.NativeEntity.Item(1).Name	
		ActiveSheet.View(G).View.ViewStyle = 32258														'turn views to 'Hidden lines removed'
	Next