Author Topic: Any way to suppress dynamic block message. Like a no for all opened files?  (Read 1446 times)

0 Members and 1 Guest are viewing this topic.

3dwannab

  • Newt
  • Posts: 32
See:



I want to batch my block library files with lisps and scripts but this message it a pain in my derriere.

cadtag

  • Swamp Rat
  • Posts: 1099
maybe try running thru accoreconsole.exe instead of the gui?
The only thing more dangerous to the liberty of a free people than big government is big business

3dwannab

  • Newt
  • Posts: 32
Thanks, I may try that this evening when I have time and come back with my result.

3dwannab

  • Newt
  • Posts: 32
Thanks, I may try that this evening when I have time and come back with my result.
Yes, I've done that accoreconsole.exe method using ScriptPro but it'll only run the scr.

Not sure how to run my autorun lisp files on them when a drawing opens from my block library.

SP fails when running in ACAD.exe mode.

Maybe there's a regedit item that could be modified!!  :knuppel2:

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Does the EXPERT variable suppress that dialog?
Be your Best


Michael Farrell
http://primeservicesglobal.com/

3dwannab

  • Newt
  • Posts: 32
Nope, already tried that.

Pretty sure there'll never be a no for all when opening multiple drawings containing parameters!

Still searching regedit for it.

ribarm

  • Water Moccasin
  • Posts: 2126
  • Marko Ribar, architect
Why don't you hit No and then exit BEDITOR and QSAVE DWG... I think the pop up sould dissappear then...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

3dwannab

  • Newt
  • Posts: 32
Why don't you hit No and then exit BEDITOR and QSAVE DWG... I think the pop up sould dissappear then...
I want to open every block file in my block library so doing that for the amount of DYN drawings (300+) I have would be just  :idiot2:

ribarm

  • Water Moccasin
  • Posts: 2126
  • Marko Ribar, architect
Why don't you hit No and then exit BEDITOR and QSAVE DWG... I think the pop up sould dissappear then...
I want to open every block file in my block library so doing that for the amount of DYN drawings (300+) I have would be just  :idiot2:

This only tells us that you acquired dynamic blocks from other source... You haven't created them... If you want you could zip them and share link over dropbox or cloud and with help of others they could be resaved in format you desire... But I suppose you refuse to share them despite they are not your courtesy???
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

3dwannab

  • Newt
  • Posts: 32
This only tells us that you acquired dynamic blocks from other source... You haven't created them... If you want you could zip them and share link over dropbox or cloud and with help of others they could be resaved in format you desire... But I suppose you refuse to share them despite they are not your courtesy???
You assume wrong. I've been making DBs from they were first added to ACAD.

My courtesy. Really?
I don't want them resaved in any format. I can use a plugin on the app store for that. Maybe re-read what I've said instead of slandering me that might set you straight. And no, you can't have my 300+ DB block dwgs that I've spent the last 12 years working on.

Here you can have one as a good will gesture.

I really hope this isin't as unwelcoming as the foobar2000 forum.

Master_Shake

  • Swamp Rat
  • Posts: 1447
I'm confused as to what you are asking in general, not specifically. What are you attempting to do with block.dwg file in your processes?

Importing the block.dwg file into an existing drawing should not cause that dialog to display and allow full function of the block. You can then export the block out into a block.dwg file. However, opening the block.dwg file should cause that dialog to appear as AutoCAD is alerting you to the fact it isn't really a drawing file.

To answer your specific question, there are 3rd party applications which can automatically select an option for a dialog prompt. Something similar to ClickYes.
« Last Edit: July 23, 2018, 08:43:13 AM by Master_Shake »

huiz

  • Swamp Rat
  • Posts: 834
  • Certified Prof C3D
I'm confused as to what you are asking in general, not specifically. What are you attempting to do with block.dwg file in your processes?

Importing the block.dwg file into an existing drawing should not cause that dialog to display and allow full function of the block. You can then export the block out into a block.dwg file. However, opening the block.dwg file should cause that dialog to appear as AutoCAD is alerting you to the fact it isn't really a drawing file.


In the OP he clearly explains that he want to batch process his blocks. Probably in this batch process the blocks need to be opened (as single drawings), do something and then save. So it is not about inserting the blocks in a current drawing and save that.


The messagebox can't be suppressed unfortunately, at least I've not found a solution for Lisp nor Script. I assume you can write a .NET plugin that opens each drawing and process it as a side database. But then you must be capable of writing plugins.


Normally The Swamp is very welcoming to new members but I think not everybody did understand the question completely :-)

The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

3dwannab

  • Newt
  • Posts: 32
To answer your specific question, there are 3rd party applications which can automatically select an option for a dialog prompt. Something similar to ClickYes.
Exactly, what my next thing was to do. I opened up spy++ to check that dialog and look for it in the registry but there was nothing. I'll look into that app. Thank you.

In the OP he clearly explains that he want to batch process his blocks. Probably in this batch process the blocks need to be opened (as single drawings), do something and then save. So it is not about inserting the blocks in a current drawing and save that.


The messagebox can't be suppressed unfortunately, at least I've not found a solution for Lisp nor Script. I assume you can write a .NET plugin that opens each drawing and process it as a side database. But then you must be capable of writing plugins.

Normally The Swamp is very welcoming to new members but I think not everybody did understand the question completely :-)
Precisely what I intend to do. My habit of blocks management is to have them as separate dwgs.

This dialog doesn't appear when you BEDIT them in a drawing. But this doesn't help me here.

3dwannab

  • Newt
  • Posts: 32
Found DialogDevil which is the ticket.

Simply, drag the icon to the No button and it'll close it automatically thereafter.

Case closed. Thanks guys for your help.

ED.
Spoke to soon. It appears that pesky dialog has a different handle every time.

3dwannab

  • Newt
  • Posts: 32
This is two different dwg files with authoring elements. 2 handles / 1 dialog.

As two cancels on the keyboard can get rid of that dialog, I also tried to put
Code: [Select]
(command ^C^C) in my accaddoc lsp but it doesn't work. That dialog prevents that from happening or it just doesn't work.

« Last Edit: July 23, 2018, 11:38:30 AM by 3dwannab »

ronjonp

  • Needs a day job
  • Posts: 7027
This ran successfully  for me:


Code - Auto/Visual Lisp: [Select]
  1. (defun c:test (/ ws)
  2.   ;; RJP - 07.23.2018
  3.   (if (= 4 (getvar 'cmdactive))
  4.     (cond ((setq ws (vlax-get-or-create-object "wscript.shell"))
  5.            (vlax-invoke ws 'sendkeys "N")
  6.            (vlax-release-object ws)
  7.            (entmakex '((0 . "circle") (10 . (0 0 0)) (40 . 25)))
  8.            (vl-cmdf "_.qsave")
  9.           )
  10.     )
  11.   )
  12. )
  13.  
Script:
Quote
_.open "G:\Ron\2018-07-23\AN_Breakline_Double_DYN (2) - Copy.dwg"
(c:test)
_.close
_.open "G:\Ron\2018-07-23\AN_Breakline_Double_DYN (3) - Copy.dwg"
(c:test)
_.close
_.open "G:\Ron\2018-07-23\AN_Breakline_Double_DYN (4) - Copy.dwg"
(c:test)
_.close
_.open "G:\Ron\2018-07-23\AN_Breakline_Double_DYN (5) - Copy.dwg"
(c:test)
_.close
_.open "G:\Ron\2018-07-23\AN_Breakline_Double_DYN (6) - Copy.dwg"
(c:test)
_.close
_.open "G:\Ron\2018-07-23\AN_Breakline_Double_DYN (7) - Copy.dwg"
(c:test)
_.close
_.open "G:\Ron\2018-07-23\AN_Breakline_Double_DYN ( 8) - Copy.dwg"
(c:test)
_.close

Windows 10 x64 - AutoCAD /C3D 2020

Custom Build PC

3dwannab

  • Newt
  • Posts: 32
This ran successfully for me
You best believe it did. How can I ever repay you? This has bugged me for years.

I've got it to work by putting this in my custom.lsp file which loads after the accadoc.lsp file.

I've wcmatch'd the filename for DYN so I'll get that popup which will, in turn, let me know to correct the filename to include DYN. (handy).

I've also added a line to hit enter also. This will be super useful on day to day editing of my dynamic blocks.

Code - Auto/Visual Lisp: [Select]
  1. (defun run_dynamic_dialog_script ()
  2.  (if (wcmatch (getvar 'dwgname) "*DYN*.dwg")
  3.   (progn
  4.    (command "_script" "Close_Dynamic_BK_Dialog")(princ)
  5.    (princ "\nYou HAVE opened a dynamic block.\n\nWozzers...\n-------------------------------------------------------\n")
  6.    ;; Comment this out if you don't want a new fancy custom dialog.
  7.    (alert "You HAVE opened a dynamic block.\n\nWozzers...\n-------------------------------------------------------\n")
  8.    )
  9.   (progn
  10.    (princ "\nYou HAVE NOT opened a dynamic block.\n\nWozzers...\n-------------------------------------------------------\n")
  11.    (alert "You HAVE NOT opened a dynamic block.\n\nWozzers...\n-------------------------------------------------------\n")
  12.    )
  13.   )
  14.  )(princ)
  15.  
  16. ;; http://www.theswamp.org/index.php?topic=54322.msg589125#msg589125
  17. (defun c:dynamic_dialog_close (/ ws)
  18. ;; RJP - 07.23.2018 - ronjonp
  19. (if (= 4 (getvar 'cmdactive))
  20.  (cond ((setq ws (vlax-get-or-create-object "wscript.shell"))
  21.   ;; This would be useful on a mass editing of dynamic blocks or even on day-to-day use
  22.   ; (vlax-invoke ws 'sendkeys "{ENTER}")
  23.   ;; else, use this to just open the file.
  24.   (vlax-invoke ws 'sendkeys "N")
  25.   )
  26.  )
  27.  )

Then created an scr with (empty line at enf of course):
Code: [Select]
(c:dynamic_dialog_close)

All of the above files are in the support path.



Now I have my own custom popup when I want.

Thanks once again.. !

« Last Edit: July 23, 2018, 04:07:42 PM by 3dwannab »

ronjonp

  • Needs a day job
  • Posts: 7027
Glad it worked out for you :)

Windows 10 x64 - AutoCAD /C3D 2020

Custom Build PC