Jump to content

Set a pagesetup up to Current for many drawings.


Recommended Posts

Posted

I have used TrueConvert to load a page setup into a group of drawings. Now I would

like to make that page setup current using some type of batch method for the group

of drawings. Is there a way to do that? If not is there a VBA script that I might be able to

put in a loop to help me do that.

 

Thank you,

Posted

Can VBA be used to set a pagesetup name to current instead of Lisp or net?

Thank you,

Posted
Can VBA be used to set a pagesetup name to current instead of Lisp or net?

Thank you,

 

No idea... I skipped VBA, and went from LISP --> .NET API.

Posted

So how do you use the (vla-SetActivePageSetup layoutname “YourPageSetupName”)

in lisp. When I cut/paste it into a simple lisp routine I get

"; error: no function definition: VLA-SETACTIVEPAGESETUP"

 

Thank you,

Posted

Sorry for not being more clear....

 

The link I provided is for a custom .NET plug-in which implements a LispFunction named vla-SetActivePageSetup and is not part of AutoCAD OOTB, which is why you've received that error. You've not loaded the .NET assembly, so it cannot find the function.

 

To load the dependent assembly, you use the NETLOAD Command, but first, you need to compile the source-code I posted in that other thread to .DLL file for your version of AutoCAD.

Posted

I have visual studio 2010 with VB.net on my machine.

So how do I do this?

Could you give instructions on how to do this?

 

Thank you,

Posted

You'll need to start a new blank DotNet library in VS (i.e. to be compiled into a DLL). Then you need to tell VS which links to use, in this case ACad's DotNet entry points, like acdbmgd.dll and acmgd.dll (there might be others as well depending on the version of ACad you use). These are found in ACad's program folder. Then you copy past BlackBox's source code into a new class file and press compile.

 

Alternative to starting a blank project, you could download the ObjectARX SDK for your version of acad. It should either contain a wizzard for starting a AutoCAD DotNet project or some samples which you can use as a template.

 

Alternatively, I've implemented a pure-lisp version previously in the same thread BlackBox has linked to: http://forums.augi.com/showthread.php?80461-Page-Setup-Manager&p=851675&viewfull=1#post851675

Save the LSP & DCL files into a support folder. Then to have it run across several DWG's use scripting with something like ScriptPro / AutoScript similar to the script in the post above.

Posted

FWIW -

 

Attached is an Autoloader .bundle for 2012 (R18.2), 2013 (R19.0), and 2014 (R19.1)... Simply unzip to %AppData%\Autodesk\ApplicationPlugins.

 

** Also important to note, is that ./Contents/Windows/2012/bbox_AcPageSetup18.dll has been compiled to .NET 3.5 which makes it available for both 2010 (R18.0), and 2011 (R18.1) as well... Since these versions do not support Autoloader, simply use NETLOAD Command, or Registry Loader.

bbox_AcPageSetup.bundle.zip

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...