Jump to content

Out of my Depth - ObjectDBX and Page Setups


abra-CAD-abra

Recommended Posts

This might be best achieved in .NET but I will put it out there in any case.

 

Deleting superfluous page setups and importing or setting a named page setup across multiple drawings through ObjectDBX?

 

At present, I just use a basic lisp on startup using "._-PSETUPIN" from a named file.

 

Cheers,

Link to comment
Share on other sites

This might be best achieved in .NET but I will put it out there in any case.

 

Deleting superfluous page setups and importing or setting a named page setup across multiple drawings through ObjectDBX?

 

At present, I just use a basic lisp on startup using "._-PSETUPIN" from a named file.

 

Cheers,

 

As I suspect you're already aware, one cannot call Commands via ObjectDBX.

 

However, as you might also already know, you can quickly iterate the PlotConfigurations Collection, to Delete() them:

 

(defun _DeletePlotConfigurations (doc)
 (vlax-for x (vla-get-plotconfigurations doc)
   (vl-catch-all-apply 'vla-delete (list x))
 )
)

 

 

You can copy the ACAD_PLOTSETTINGS Dictionary entries from one Document to another, in order to 'import' named Page Setups.

 

As for setting a given named Page Setup as active for one or more Layouts, that will require something like this:

 

 

Example

 

(foreach layoutname (layoutlist)
 ([color="red"]vla-SetActivePageSetup[/color] layoutname “[color="blue"]YourPageSetupName[/color]”)
)

 

 

 

 

Cheers

Link to comment
Share on other sites

Thank you for taking the time to respond, I will use the information provided to try and achieve what I want.

 

No worries; I'm interested to see what you come up with. :)

 

 

 

 

That is incredibly kind of you to say; thank you. :oops: :beer:

 

Cheers

Link to comment
Share on other sites

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...