Jump to content

Silently Import Page Setups, redefine if exist! HELP!


tmelancon

Recommended Posts

I currently have a routine that imports Page Setups from a master file. Its like 20 plus page setups. My question is that when this routine runs and a drawing currently has one or more page setup being re imported then it prompts the user with a Y or N if they would like to redefine.

 

I do not want this infringing on my CAD guys, and just wish to import and redefine automatically and silently if necessary. So they are not bothered. See code below.

 

(DEFUN C:PSN () (command "._-PSETUPIN" "G:/DESKTOP/PAGE SETUPs/MASTER_Page_Setups.dwg" "*")(PRINC))

 

Any help would be appreciated. Thanks in advance.

Link to comment
Share on other sites

Ahhh Expert. That did the trick. Worked like a charm, only issues(which really isnt a problem) is how it shows all 20 plus page setups redefining in the command line.. Arghh I dont suppose cmdecho would work or something like that?

Link to comment
Share on other sites

  • 2 weeks later...

I am back again, I have tried to no avail to silence the redefining of these page setups. Nothing works. Any suggestions of something I can add to the existing code to make this happen?

Link to comment
Share on other sites

Take a look at functions getPageSetupName, deletePageSetup and addPageSetup defined by code http://jtbworld.com/autocad-pagesetup-lsp. You should be able to use getPageSetupName to test for the Page Setup you want to replace and use deletePageSetup to delete it if needed, and use addPageSetup to add the one you want.

 

No command functions used so nothing should show up on the command line.

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