RemoveHiddenLines Example

Using Programming Languages other than VBA

Sub Example_RemoveHiddenLines()
	' This example creates a new paper space viewport.
	' It then displays the value of RemoveHiddenLines for the viewport.

	Dim pviewportObj As AcadPViewport
	Dim center(0 To 2) As Double
	Dim width As Double
	Dim height As Double

	' Define the paper space viewport
	center(0) = 3: center(1) = 3: center(2) = 0
	width = 40
	height = 40

	' Change from model space to paper space
	ThisDrawing.ActiveSpace = acPaperSpace

	' Create the paper space viewport
	Set pviewportObj = ThisDrawing.PaperSpace.AddPViewport(center, width, height)
	pviewportObj.DISPLAY True
	ThisDrawing.mspace = True
	ThisDrawing.ActivePViewport = pviewportObj
	ThisDrawing.Regen acAllViewports

	' Find the value for RemoveHiddenLines for the viewport
	Dim removeHidden As Boolean
	removeHidden = pviewportObj.RemoveHiddenLines
	MsgBox "The value of the RemoveHiddenLines property for the paperspace viewport is " & pviewportObj.RemoveHiddenLines, , "RemoveHiddenLines Example"

End Sub

 

   Comments?