TheSwamp

CAD Forums => CAD General => Dynamic Blocks => Topic started by: Matt__W on July 16, 2010, 01:34:21 PM

Title: Convert dynamic block to regular block
Post by: Matt__W on July 16, 2010, 01:34:21 PM
Can this be done easily??  If so, how?
Title: Re: Convert dynamic block to regular block
Post by: mjfarrell on July 16, 2010, 01:43:25 PM
save the wblocked dynamic block file to a NON dynamic block compatible version of autocad

presto the dynamic block is broken for ever more
Title: Re: Convert dynamic block to regular block
Post by: Matt__W on July 16, 2010, 01:49:12 PM
save the wblocked dynamic block file to a NON dynamic block compatible version of autocad
Boy, that's a mouthful.


that's what she said
Title: Re: Convert dynamic block to regular block
Post by: Birdy on July 16, 2010, 05:43:32 PM
 :-D
Title: Re: Convert dynamic block to regular block
Post by: Kerry on July 16, 2010, 07:58:18 PM

I may have dreamt this :
I have a recollection of system variables and/or editor process that saved dyn'Blocks as Blocks.
Title: Re: Convert dynamic block to regular block
Post by: mjfarrell on July 16, 2010, 08:26:06 PM

I may have dreamt this :
I have a recollection of system variables and/or editor process that saved dyn'Blocks as Blocks.

was it this you were dreamong of?

Quote
Ribbon: Block Editor tabOpen/Save panelSave Block AsNot available on the ribbon in the current workspace.
 Command entry: bedit  bsaveas

only I don't know...(did'nt try) if one can change the file type during that process?
Title: Re: Convert dynamic block to regular block
Post by: Lee Mac on July 16, 2010, 08:30:31 PM
... (http://www.theswamp.org/index.php?topic=32681.msg382548#msg382548)
Title: Re: Convert dynamic block to regular block
Post by: Kerry on July 16, 2010, 08:34:27 PM
was it this you were dreamong of?

no

only I don't know...(did'nt try)

why not ?

if one can change the file type during that process?

no
Title: Re: Convert dynamic block to regular block
Post by: Kerry on July 16, 2010, 08:41:53 PM

Try REFEDIT

the piccy:


Title: Re: Convert dynamic block to regular block
Post by: HasanCAD on July 17, 2010, 03:46:30 AM
by changing Z scale value
or
open useing REFEDIT command
or
Read this
http://www.theswamp.org/index.php?topic=32681.0

HaSaN
Title: Re: Convert dynamic block to regular block
Post by: mjfarrell on July 18, 2010, 11:26:37 AM

only I don't know...(didn't try)

why not ?


[/quote]mostly due to intuiting that the question wouldn't be asked if a solution was available so easily....
Title: Re: Convert dynamic block to regular block
Post by: hermanm on September 19, 2010, 03:03:10 PM
This is really crude, but shows what can be done:
Code: [Select]
;;;---------------------ToStatic.lsp--------------------------------
;;; Purpose: Converts anonymous block to named static block
;;; Version:1.0
;;; Date: 2 June 2010
;;; Author: Herman Mayfarth
;;; Copyright © 2010 by Herman Mayfarth.
;;; Provided "as is" and without warranty, express or implied.
;;; Use at your own risk.
;;;-----------------------------------------------------------------
(defun C:Static ( / obj)
  (setq obj (vlax-ename->vla-object (car (entsel "\nPick a block reference:"))))
  (vlax-invoke obj 'ConvertToStaticBlock
    (substr (vlax-get-property obj 'Name) 2))
  (princ)
);C:Static

If you used it to convert different visibility states to static blocks, you would probably want to rename the blocks afterward, since the anonymous blocks will have names like: *Uxxx, and all this command does is strip the first character from the block name. Since it doesn't check the first character, if you convert a dynamic block named, say, "A325"  you will get a static block named "325"

It will convert static, as well as dynamic, unnamed blocks to named blocks.

This could obviously be improved, & anyone is welcome to use this as a starting point for something really slick.

I needed something Q & D for a specific purpose, & only had 5 minutes to spend on it.
:)
Title: Re: Convert dynamic block to regular block
Post by: Lee Mac on September 19, 2010, 05:12:25 PM
See #6  :-)
Title: Re: Convert dynamic block to regular block
Post by: johnratliff on April 13, 2015, 04:51:40 PM
See #6  :-)

I'm trying to clean up a CADWorx BOM routine that just puts plain text on a sheet. I have a script and lisp routine that does this by exporting to a csv file and then I just bring them into excel. I have a little extra time and started playing around with some dynamic blocks as templates.

I have been looking for a way to remove unused attributes built from a lookup table. I created the attached dynamic block with a double lookup table and maybe its not such a good idea because I'm left with extra fields when I try to turn it into a static block. Tried the delinv.lsp but it doesn't work on my lookup table. Anyone got any suggestions for making this block static? or a way to automate geting plain text into a table?
Title: Re: Convert dynamic block to regular block
Post by: Bethrine on May 21, 2015, 05:20:56 PM
From same thread Lee Mac posted:

In my CAD customization class, we were warned that after we saved our drawings with dynamic blocks, if we save them as a .dxf we would lose the dynamic block functions and any hyper-links.
just a thought from a newbie.
Although - I really like the code though too
Title: Re: Convert dynamic block to regular block
Post by: mjfarrell on May 21, 2015, 05:25:53 PM
you might be able to use a bad thing to your advantage...

Quote
Warning ATTSYNC removes any format or property changes made with the ATTEDIT or EATTEDIT commands. It also deletes any extended data associated with the block, and might affect dynamic blocks and blocks created by third-party applications.