TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

Register
 
Be sure your post is relevant to the current discussion.  Create a new topic within the appropriate board if you are unsure.

delete PaperSpace
Read 5140 times
* May 03, 2010, 07:41:20 AM
Dear all.
What is the way to delete a PaperSpace?

Thank you in advance.

Logged


May 03, 2010, 08:19:38 AM
#1
Right mouse click on the Paper tab in question and select Delete.


* May 04, 2010, 02:22:46 PM
#2
in a macro or SDK

Logged


* May 05, 2010, 01:32:28 AM
#3
Hi Sagittarius
paperspace is in the GXMPSLib

in VB/VBA
add GXMPS 8.0 Type Library   to the reference

if you want to delete the 3-rd paperspace:

ActiveDrawing.PaperSpaces(2).Delete

I already wrote an .exe

best regards
Bernd
« Last Edit: May 05, 2010, 06:15:31 AM by ibruethsch »

Logged


May 05, 2010, 06:52:57 AM
#4
Hi Sagittarius
paperspace is in the GXMPSLib

in VB/VBA
add GXMPS 8.0 Type Library   to the reference

if you want to delete the 3-rd paperspace:

ActiveDrawing.PaperSpaces(2).Delete

I already wrote an .exe

best regards
Bernd


I am curious. Does the macro allow you to delete a list of selected pages? Is that why one might need such a thing? I never have very many pages in a drawing so the two mouse clicks to delete a page doesn't seem like much effort. However, I know that there are people who use TC more intensely than I, hence my question.


* May 05, 2010, 07:15:13 AM
#5
    ActiveDrawing.PaperSpaces(2).Delete
did not work in a macro and SDK
ibruethsch, let me please see your source code

best regards

Logged


* May 05, 2010, 02:52:37 PM
#6
Hi Don
I insert .dwg very often. And each time I do that TC add two paperspaces.
That is why I wrote that macro.

Hi Sagittarius

the sourcecode

Sub del_paperspace()
ActiveDrawing.PaperSpaces(2).Delete
End Sub

works fine here.
Make sure you have added the reference.

best regards
Bernd

Logged


* May 05, 2010, 04:14:37 PM
#7
Hi Sagittarius
here is the sourcecode VB

Dim app As Application
Dim ps As Object
Dim i As Integer

Sub main()

Dim n As Integer

Set app = IMSIGX.Application
Set ps = app.ActiveDrawing.PaperSpaces
n = Int(ps.Count)
    n = InputBox("wieviele paperspaces - zählt von hinten? !!    ", "Eine Zahl eingeben  ", n)

For i = Int(ps.Count - 1) To Int(ps.Count - 1) - n + 1 Step -1
ps(i).Delete
Next i

End Sub

Logged


* May 06, 2010, 06:55:08 AM
#8
In a macro it says object does not support this property or method (delete)
in SDK just does not work

Logged


May 17, 2010, 10:41:10 PM
#9
Hi Sash

Logged
HH


* May 28, 2010, 02:27:46 AM
#10
Hi Sagittarius

i just tried to use the .exe with TC15 and got the same error as you.
With TC17 it works fine  :-\

Bernd

Logged