News:

When replying to a specific statement be sure to quote the previous post.

Main Menu

delete PaperSpace

Started by Sagittarius, May 03, 2010, 07:41:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sagittarius

Dear all.
What is the way to delete a PaperSpace?

Thank you in advance.

Don Cheke

Right mouse click on the Paper tab in question and select Delete.
Don Cheke
My Blog: One Man's Meanderings

Sagittarius


ibruethsch

#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

Don Cheke

Quote from: ibruethsch on May 05, 2010, 01:32:28 AM
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.
Don Cheke
My Blog: One Man's Meanderings

Sagittarius

    ActiveDrawing.PaperSpaces(2).Delete
did not work in a macro and SDK
ibruethsch, let me please see your source code

best regards

ibruethsch

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

ibruethsch

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

Sagittarius

In a macro it says object does not support this property or method (delete)
in SDK just does not work

Hugh_Hull

HH

ibruethsch

Hi Sagittarius

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

Bernd