-Wblock Multiple Blocks?

Hi

Any idea on how to use the multiple option in -Wblock? The command prompt needs '&' after which it is meant to go into multiple mode. Once there, any time I hit space to add the second block name the command progresses and ends. I have tried typing out the block names separated by '&' that then results in an error saying cannot find block with this name.

Any suggestion?

Thanks

Comments

  • ALANH
    edited April 22

    It may be the only way to do multiple wblocks is to do it inside a simple lisp loop.

    ((defun c:wblk ( / x pt ss)
    (setq x 0 )
    (setvar 'filedia 0)
    (prompt "\nmake selection press Enter to exit")
    (while (setq ss (ssget))
    (setq pt (getpoint "\nPick insert point "))
    (command "-wblock" (strcat "d:\acadtemp\test" (rtos (setq x (1+ x)) 2 0) ".dwg") "" pt ss "")
    (prompt "\nmake selection press Enter to exit")
    )
    (princ)
    )

  • Thanks Alan. Mainly I was after some clarity on the multiple option in the wblocks command but a Lisp routine will do for now.

    Anyone from Bricsys or anyone else who can clarify the use of the multiple option in the -wblock command. I have read the help file, but I am unable to use the command. So, I was looking for a walkthrough of sorts.

  • Anthony Apostolaros
    edited April 26

    • After specifying a filename/path, respond to the next prompt with just an ampersand (&).
    • That puts you in multiple mode. Then type the names of the blocks, separated only by commas.
    • All those block definitions will be in the new file, but not inserted and exploded as they would be in singular mode.

  • But that results in a single file with multiple blocks and not multiple files with individual block contents, huh! I got the same result earlier and hence though I was doing something wrong.

    Thank you for clearing that up. So, IMO this multiple option in the Wblock command is useless. Bricsys need to rethink this.

  • You can do a simple lisp that emulates what you want select objects do Wblock with a name and repeat particularly if your after say "BLK1", "BLK2", auto name generation.

    Like wise as suggested you can make a list of block names and just do select then enter, for the number of items in the list.

  • Maybe use the drawing explorer, you can select multiple blocks, then press the save button

  • Hi 'Its_Alive'

    Have tried that, it does the same as being discussed above. It creates one block with all the selected blocks which isn't the outcome expected.

    Hi AlanH

    Yes, I did create a Lisp to help here but I am discussing the core command functionality.

    Thanks all

  • interesting, I get separate blocks

  • Hello.

    The functionality of WBLOCK / -WBLOCK is to write some entities from the current drawing to another drawing.
    So, there is always a single new drawing created, just as in Autocad.

    The purpose of using -WBLOCK with the option "&" is to create a new dwg file containing the definitions of the specified blocks.
    Only the block definitions are added to the new file, not the block references.

    This post seems to refer to exporting multiple blocks each to its own file.
    This task is not specific to WBLOCK and it would require, as mentioned in the previous posts, either a lisp automation or using Drawing Explorer.

  • I get separate files too. I didn't know about that option before, but I tried it out. I selected 3 blocks in Drawing Explorer, then clicked on the Save Block icon. I got 3 new files, just like if I had used the Wblock command 3 times.

  • Hi Its_Alive,

    I stand corrected, yes it does give you individual files but the problem with this approach is it keeps prompting for a filename. Which would work if the dialog box pre-entered the blockname rather than the base file name. What happens with this is you end up naming your blocks 1, 2, 3,….. as you have done above. You did that for you had no clue which block is currently being 'wblocked'.

    Thanks Virgil, your explanation of the -wblock command is right and yes it does exactly what you said. Plus, yes you need a Lisp code to do what I need. But as you can see from the commentary above this is partly possible via the drawing explorer and my comment of 'Bricsys need to rethink this' is to urge Bricsys to improve the command.

    IMO BricsCAD is a far superior software so I honestly think Bricsys needs to stop comparing itself to AutoCAD at every step of the way.

    Thank you all for this conversation

  • "Bricsys needs to stop comparing itself to AutoCAD at every step of the way."

    From a command perspective, Bricsys must maintain some level of compatibility because there are scripts that call these commands too

    From the Drawing explorer perspective, this can certainly be improved, the block name dialog can be prefilled, where you just hit enter a few times accepting the default

    Or if multiple items are selected, use a open path dialog and write selected to the selected path

    you could file a SR suggestion