VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Purge Page Setups

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
252 Views, 5 Replies

Purge Page Setups


Is there a way to purge page setups?  As in
the Page Setup Manager of a drawing.


--
 
Thanks,
David M.
Gardner
Change the DOT to reply
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous


Here's my version.

 


Sub DeleteAllPlotConfigs()

 

    'allows command line interaction for deletion of plot
all configurations
    Dim colPlotConfig As
AcadPlotConfigurations
    Dim objPlotConfig As
AcadPlotConfiguration
    Dim Response As
String
    Dim KeyWords As Variant
   

    'loop through plot configs and delete
all
    KeyWords = "Yes No"
   
ThisDrawing.Utility.InitializeUserInput 6, KeyWords
   
Response = ThisDrawing.Utility.GetKeyword(vbCrLf & "Are you sure you want to
delete all plot configurations? [No] : Yes")
    If Response =
"Yes" Or Response = "" Then
        Set
colPlotConfig =
ThisDrawing.PlotConfigurations
        For
Each objPlotConfig In
colPlotConfig
           
ThisDrawing.Utility.Prompt (vbCrLf & objPlotConfig.Name & " was
deleted.")
           
objPlotConfig.Delete
       
Next
    Else
       
Call DeletePlotConfig
    End If

 

End Sub


--
----
Ed
----
Message 3 of 6
Anonymous
in reply to: Anonymous


I also have a dialog version that allows the user
to click select which ones to delete. Also included are routines to import from
templates.All are available from the Exhange at
href="http://www.augi.com">www.augi.com
.


--
----
Ed
----
Message 4 of 6
Anonymous
in reply to: Anonymous


Thank you I was able to download you
PlotConfigs.dvb and I will give it a look over.


--
 
Thanks,
David M. Gardner
Change the DOT to
reply


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">


I also have a dialog version that allows the user
to click select which ones to delete. Also included are routines to import
from templates.All are available from the Exhange at
href="http://www.augi.com">www.augi.com
.


--
----
Ed
----
Message 5 of 6
Anonymous
in reply to: Anonymous


What AxDb do I need to register.  I have
Inventor 11 Series installed.  I have one with out a number in the MDT 2007
and Inventor 11\compatibility\bin directories.  I figure that it would be
that one and then change the code to suit correct?


--
 
Thanks,
David M. Gardner
Change the DOT to
reply


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">


Thank you I was able to download you
PlotConfigs.dvb and I will give it a look over.


--
 
Thanks,
David M. Gardner
Change the DOT to
reply


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">


I also have a dialog version that allows the
user to click select which ones to delete. Also included are routines to
import from templates.All are available from the Exhange at
href="http://www.augi.com">www.augi.com
.


--

----
Ed
----
Message 6 of 6
Anonymous
in reply to: Anonymous


Current versions automatically register that dll.
When I wrote that, you still had to manually register it if you wanted to use
it.

 

FYI, to get the class name of a registered class,
you can check in the registry under HKEY_CLASSES_ROOT. In this case, look for
ObjectDBX* to see which class is registered on your machine and use that in the
ObjDbx class.


--
----
Ed
----

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost