My Photo

May 2009

Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            

BLOGMap


April 21, 2006

ALERT!! Bad Dynamic Block Bugs!!

Well its been a while since my last post. Its been pretty hard to get focused to sit down and write when the playoff chase for the NHL playoffs was going on. Now that my favorite team, the San Jose Sharks safely swooped into the 5th playoff spot we get to face the Nashville Predators tonight in Nashville. Hopefully they pull out a win tonight, well just have to wait and see.

So these pesky Dynamic block bugs? One of these bugs have been around since AutoCAD 2006. This bug has to do with inserting a Dynamic block using the explode option. So if you insert a dynamic block using the explode check box option you will infect your entire drawing with Dynamic block actions and parameters. Yes you drawings will think its a Dynamic block now when ever you open the drawing? This happens when you insert using the Dialog box explode check box, or even using the transparent -INSERT and using the "*"+blockname (*block1). If this accidentally happens to you, each time you open a drawing you'll be prompted to open the drawing in the block editor. Select YES. Once you enter the block editor, PAN and ZOOM around do some Regen's to adjust the parameter and action text size to locate the Dynamic block actions and parameters. Once you find them, select then and DELETE them. Once you're done location all the actions and parameters. Select the close block editor and save your drawing. The drawing will close down simply open the drawing back up using the OPEN command or the SSM and you should be back to normal. This one can be pretty annoying. So be careful especially when using the INSERT Dialog box along with Dynamic Blocks.

The other Dynamic block bug is inside AutoCAD 2007. If you insert a Dynamic block containing Attributes into your drawing. Next take the block and change a Dynamic block parameter, a linear rotate anything to modify the block. Now take that block and simply mirror it to the right, left, top or bottom of your drawing. Now select the newly created object from the mirror operations and use the COPY CLIP command, CTRL+C or edit pull down and COPY. Once your block is stored in the clipboard next switch over to a different drawing and paste the block into the drawing. You'll notice that ALL your attributes now show backwards. The only way I've been able to get a block into another drawing when it was mirrored is to XREF in the entire sheet into another drawing then use the BIND and INSERT option.

Hope this helps people out as this has come up many times here in our office.

P.S. GO SHARKS!!!

February 10, 2006

Hatch patterns in your Dynamic blocks got you down?

As one of my fellow bloggers Barry Ralphs (BazzaCAD Clog) said its been crazy here at work also. We've had most the CAD staff working on one project each day trying to get our selves back ahead of our projects. So I've been neglecting my posts. But no fear, I have many more Dynamic block posts coming in the future.

So, I've received many e-mails over the last 6 months about people having issues with hatches in dynamic blocks. Some advice I have is try two methods when your creating you blocks. First use the associative hatch "Pick Points" option to hatch in a desired area that you're going to apply your action to. Another option you can try is add draw in a boundary on a non plotting layer and apply you hatch using the "Select Objects" option.

All around I've seen many different problems with hatches. Some can also be fixed by simply doing a REGEN ALL to get the hatch to appear right. And some they need to be re-created??

TIP: If you're using a SOLID FILLED hatch pattern and having problems with you hatch patterns, a suggestion is you can use a old legacy command called SOLID aka 2D Solid. This will allow you to select a triangular, rectangular simple shape and shade it in with a 2D SOLID. This should work pretty well in you Dynamic block limiting the frustration in your block Authoring. Unfortunately if you want to use a different pattern that a SOLID FILLED then you're kind of outa luck. Hopefully the next release will fix some of these problems.

January 05, 2006

Create Custom Parameter Sets in Authoring Palette

Now that many are probably more comfortable with the new Dynamic block Authoring environment (Block Editor). I wanted to try and answer a question some may be wondering. What are these parameter sets all about? Well a parameter set is basically a quick way to build your dynamic blocks. They allow you to set up parameter & action sets for your dynamic blocks. So you could set up a button that will prompt you for a Linear parameter then have it immediately run the stretch or move action afterwords. These parameter sets come in real handy if you're trying to replicate a bunch of dynamic blocks. They do at times seem to be a little limited but the general functionality is there. I personally rarely use these but some may find a liking to them.

Once you activate the Authoring palette "Parameter Sets" you can then Copy a tool and paste it back in to create another parameter set. You can also select properties to change actions or parameters associated with the tool.

Parameterset1_2

If you choose the properties option you can change the name of the tool, and also the associated actions for the tool. You can modify the amount of grips, or the properties type of parameter the tool uses.

Parameterset2

Here you can add actions that are associated with the new tool.

Parameterset3

December 08, 2005

Attribute Setup

I've received a couple e-mails lately with people asking about the different ways to setup attributes in a Dynamic block. Especially attributes in a Dynamic block with visibility states. So there are two different types of attribute situations you can setup in your block. The first option is, you edit an attribute value in one visibility state and all visibility states attributes are affected and show the same value when active. So you could have an attribute that says "Manufacturer" and change that value and affect all visibility states if all visibility states are from the same manufacturer. The second option is have different attributes for each different visibility state. For example if you have that Manufacturer attribute you can have a different manufacturer value for each visibility state.

So what needs to be done in option number 1? Well the first thing you need to do is open your first visibility state. Next issue the Make Visible routine from the visibility toolbar and select your attributes that you want to show in each visibility state. (Note: You can make them visible in all visibility states at once using the BVSHOW command)

The second option you will need to copy your attributes to each visibility state you want it to show in. Next, change the identical attribute tags so no tags are alike. I usually just append a 1, 2, 3 or A, B, C to the end of the tag. If the Tags are identical the block will get confused.

This is a really confusing subject so hopefully this sheds some light. You can also download the attached sample file to better explain it.

Click here to download the sample file. Download attribute_setup.dwg

November 18, 2005

Convert block to Layer 0

Do you get sooo frustrated when you see you're users EXPLODING your nice Dynamic blocks? Yes, there is the option that allows you to specify which blocks can be exploded. But face it, sometimes you have to. There is options where a block needs to be a totally different layer, or color or linetype. I run into this all the time. But I may have a solution for this.

If you use the attached code called MAKE0, it prompts you to select a block,  dynamic or not. It will next take that block and create a block with the same block name but with the extension -0. Then change all the objects in the block from its current layers and settings to layer 0. It will erase the old block and insert the new block in the same location. Once placed, the block will get the same settings in the currently set layer for the drawing. Allowing you to change the appearance of you blocks without having to explode them.

Here you select the block.
Make01

Next your block will get the current layers properties applied to it.

Make02

Now your block is still a block and will change as you change its layer settings.

Make03

Here the block changes as you change its current layer.

Make04

Now for the code!!

Note: Dynamic blocks wont be set back to their dynamic block states. It will act just like a reset. You will also notice a quick flash when the code enters the dynamic block editor. This is needed to retain the dynamic block properties.

(defun c:make0 (/     oldblk oldblkname  oldblkX
  oldblkY     oldblkZ oldblkrot   newblkname
        )
  (setvar "osmode" 0)
  (setvar "blockeditlock" 0)
  (setq oldblk (entsel "\nSelect Block for Zero Makeover: "))
  (setq oldblkname (vla-get-EffectiveName (vlax-ename->vla-object (car oldblk))))
  (setq oldblkins (cdr (assoc 10 (entget (car oldblk)))))
  (setq oldblkX (cdr (assoc 41 (entget (car oldblk)))))
  (setq oldblkY (cdr (assoc 42 (entget (car oldblk)))))
  (setq oldblkZ (cdr (assoc 43 (entget (car oldblk)))))
  (setq oldblkrot (cdr (assoc 50 (entget (car oldblk)))))
  (setq newblkname (strcat "0-" oldblkname))
  (if (= (tblsearch "block" newblkname) nil)
    (setq testflag 0)
    (setq testflag 1)
  )
  (if (= testflag 0)
    (progn
       (COMMAND "-BEDIT" oldblkname)
  (command "bsaveas" (strcase (strcat "0-" oldblkname)))
  (command "change" "all" "" "p" "la" "0" "")
  (command "bsave")
  (command "bclose")
  (command "erase" oldblk "")
  ))
  (command "erase" oldblk "")
  (command "insert"
    newblkname
    oldblkins
    oldblkX
    oldblkY
    (/ (* 180 oldblkrot) pi)
  )
  (gc)
  (princ)
)

November 09, 2005

Dynamic Block Free Tutorial Videos

Just saw this on one of the Autodesk Discussion forums. DG CAD has provided 5 videos, all free to download of Dynamic block tutorials. The videos although are around 100 mb each. I have not checked them out, but feel free to leave comments here on what you think. I'm going to try and download them tonight to check them out. I'll comment back on what I think. I've been debating on writing some tutorials and videos myself, but not sure if people prefer step by step tutorials or videos? Most the time, videos or tutorials never really apply to the discipline I'm working at? But I guess a general all around aspects are nice.

Topics covered.
Lesson 1: Overview
Lesson 2: Stretch, Array, Align, Flip
Lesson 3: Point Parameter, Stretch, Rotate, Flip
Lesson 4: Lookup Parameters, Lookup Actions, Rotate
Lesson 5: Visibility Parameter, Linear Parameter, Scale Action.

You can download the tutorials here.. http://www.dgcad.com/Acad2006.htm

November 02, 2005

Attributes Problem Part 2

When converting you're old legacy blocks to Dynamic blocks, you may have noticed some problems with your dynamic blocks. Especially blocks that contain existing attribute data information. The main problem happens when you try and redefine an existing block containing attributes, with a new Dynamic block with locked attributes. This causes the blocks attribute grips to show, and not be locked in all existing occurrences of the block. So you're legacy blocks attributes wont work when being redefined.

Now I've heard some people are going around erasing their old attribute blocks and re-inserting the new Dynamic block. Others are leaving the old blocks as is, and newly inserted blocks will have the dynamic properties, that work on the attributes.

An easier method is simply use the ATTSYNC command. This command allows you to SYNC or update all instances of a selected block with the current attributes defined for the block. So, it will quickly update all your old legacy blocks with un-locked attributes to locked attributes. Making them work in your dynamic blocks again. Another command you can use is the express tools BATTMAN. There is a SYNC button contained inside there.

Below is some images to better explain.

Here is an image of old legacy blocks with un-locked attributes.
Attprob1
This image shows existing regular blocks once redefined by a Dynamic block. Notice the Dark blue attribute grips show along with the light blue Dynamic block grips.
Attprob2
This shows the prompts for ATTYNC. Specify YES to process your blocks in the drawing. This process needs to be done on each different block name that you want to update.
Attprob3
Once ATTSYNC is completed, all your existing blocks with that block name are now updated to locked attributes and your Dynamic blocks should function normally.
Attprob4

September 30, 2005

Duplicate Attribute entries in Dynamic Blocks

Does your Dynamic block have duplicate attribute entries? And you need to update one, and have that automate to others attributes in your block? Well you can. All you need to do is create a lookup table inside your Dynamic block and fill in some attribute values in the lookup properties column. Once you've filled in all the lookup pretties for your block, you need to add a blockplaceholder field inside each of your attributes. Then point your blockplaceholder field to this lookup table you just created. Then that's it.

Now when you insert your block, you can select your lookup table grip and modify all your attributes at once. Now this system works good if you know what your values are going to be every time. If your values change like a grid system, where you may have grid line 11.7 or BB.6. Its a little overkill to try and add every possible value in. But this works good for simple values like the example I have below. Now I understand this work around may not be what everyone envisioned AutoCAD to do. But works with the tools we have, without having to punch out some code.

Here create your Lookup table or attribute entries.

Duplicateatt1

Here path in your blockplaceholder field to the lookup table you just created.

Doubleatt4

Now select your lookup table you created and change your value.

Doubleatt2

Then both attributes will update upon regen.

Doubleatt3

Click here to download the sample DWG. Download SECTION.dwg

September 17, 2005

Dynamic Cut Symbol

Face it, we all need it! Cut symbols are used all the time. Now the tricky part is how to get it in your drawing? How to manipulate it for scales, and what it looks like. Well I decided to punch out some code that could help 2 of these 3 problems. Attached is a Lisp code I wrote to allow a user to pick 2 points and place a cut symbol. Now whats cool about this cut symbol is its a dynamic block. It has grips on each end to always keep the cut symbol centered. Or if you need it to be slightly to the right or left you can do that also. The Dynamic block is also tied in with the code so if you pick two points really close you will get a straight line cut. This way not cluttering up your drawing. I've attached a couple sample cut symbols you can test with. But feel free to take these couple blocks and expand upon them for your office standards.

To test and use the Dynamic Cut block. Simply issue APPLOAD and load the attached Lisp code. Then make sure the dynamic CUT block called "CUT" is in the drawing. Then just run the command "CUT". If you need the scale of the CUT symbol bigger just change your DIMSCALE. The Cut symbol will scale up as you change Dimscales.

Click here to Download the Dynamic CUT lisp code.Download CUT.LSP

Click here to Download the Dynamic CUT Block #1. Download CUT.dwg
Cut
Click here to Download the Dynamic CUT Block #2.Download CUT2.dwg (If you want to use this block with the code you need to rename the block name back to "CUT". I cant attach 2 file types with the same name in these posts. Sorry.)
Cut_2
If you have some cool cut symbols you'd like to share with others feel free to e-mail them to me. By sending them to me you agree that the blocks can possibly be posted on this blog for others to access.

September 07, 2005

Dynamic Block White Paper part 3

The Dynamic blocks white paper series has been completed. Part 3 of 3 has been released and has many good explanations on Dynamic block usage, parameter naming and conventions.

Thanks Ellen for the great work, of this 3 part series!!

http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=5543837