AutoCAD Weekly Block #05: Dynamic Door

Download this Block and learn about Flip Parameters.
Català - Castellano - Deutsch
On this week's Block we will quickly see how to use the Flip Parameters/Actions. To do that we will use a block of a 80cm door, which in metric unit system would be the most common door you would need to use.
What we want to achieve adding the flip parameters is to be able to flip the door to open to one side or the other without the need to actually using the MIRROR command. So basically we need to add two flip parameters, one to flip the door to open right or left and another one to flip the door to open in or out. Download the block and you will see what it can do.

As you can see in the image above, when the block is selected it shows two arrows. This two arrows allow us to flip the block. But lets quickly see how this arrows work. If we enter the Block Editor, this is what we see.

What I have done is to create two Flip parameters (Flip State and Flip state 1 on the image) following the two perpendicular axis of the block. Then, I added a flip action to each of those parameters, and selected the door and the arch as objects. Nothing else, simple but effective. Of course if you are a user of AutoCAD Architecture this block is useless, but for those using plain AutoCAD this might be useful.

Show me more...

AutoCAD: Layer Creation Script

Learn how to edit a script to re-create all you standard layers
Català - Castellano - Deutsch
Having your standard layers is basic for easy printing and having everyone in the same office know which layers to use for each object. The creation of standard layers and plot tables can be long but it is important if you are trying to set your own standards for several projects.
Some layers are deleted when using commands like PURGE. To get them back there are several methods. One of them is to have a Script that creates all the layers again. This sample script will generate only 3 layers, but it is useful to see how this type of script works. To test the script, save it to your hard drive and type SCR in AutoCAD. Then Browse to the folder where you have saved it and select it. The syntax of the script is as follows:

What you see after ;;; signs is pure description. The script consists of 3 lines. It calls the -LAYER command (See that it uses the hyphen version of the LAYER command, so it does not call the Layer manager window). After each -LAYER there is MAKE to create a new Layer. Then each of the properties of that layer are set.
Following the syntax of this Script with the properties of your standard layers you can generate a script that will allow you to quickly recover all the layers that have been deleted. Here is the link to the Script again.

Show me more...

AutoCAD: My non Sandard Aliases (or why you Should not use Icons)

This are the Aliases I have modified to work the way I like it. I barely need to use any icons.
Català - Castellano - Deutsch
I am a 95% command line AutoCAD user. With that I mean that when I work, I only use icons for 5% of the commands. TO be sincere I think the only reason why I still use those icons, is because I´ve been lazy to set up an ALIAS for them.
The question of using icons or entering the commands with the keyboard seems just a question of taste, but it is not. It is a question of speed. If you want to work fast, forget about using Icons, you should use keyboard commands. The work speed you can achieve having one hand on the keyboard and the other on the mouse is at least 5 times faster than if you have to move the cursor every time to click on an icon.
With that said, some everyday commands have no short alias to make them easy to access, that is why you might need to create your own aliases for those actions you use everyday aften.
For me, there is certain amount of commands I use everyday enough to need a short Alias. For me a good alias is either a single letter or two letters close to each other. THis makes those commands really quick to use, and your fingers soon remember where the letters are so you don't even need to look at the keyboard to enter them. This are the ones I modified in my acad.pgp file (remember that you can easily modify this file with the ALIASEDIT express tool)
  • C, *COPY: just thing of how many times you draw circles and how many times you copy objects, to me having C as circle and CO as copy just makes no sense.
  • CI, *CIRCLE: Because of the one before.
  • CC, *NCOPY: THis is a useful command when woring with blocks or XREFs, I use it very often. See here what it does.
  • LK, *AI_MOLC: Makes the selected object's layer active.
  • LL, *LAYON: Turns ON all the layers that were Off
  • LO, *LAYOFF: Turns the layer of the selcted object Off
  • LU, *LAYTHW: Thaws all frozen layers.
  • MM, *MATCHPROP: Matches the properties of an object to another one.
  • R, *ROTATE: For the same reason I use C for Copy, R is used too often to be RO.
  • RR, *RECTANG: Much easier than typing REC.
  • WW, *WIPEOUT: I use wipeouts often enough to set a short Alias.
  • XX, *EXTRIM: This is a useful very useful command. It cuts all lines on one side of an object.

If you think this is useful, you can download my acad.pgp here. See that since I am using AutoCAD Architecture, some commands are specific to this progam and might not work in plain AutoCAD.

Show me more...

AutoCAD: EDGEMODE System Variable

Why are the lines being trimmed using the extension of the existing lines?
Català - Castellano - Deutsch
The TRIM and EXTEND commands can be used in 2 different ways. One is to select the objects to use as a TRIM or EXTENSION line and then select the objects to trim or extend. The second option is to press ENTER when we are asked to "select cutting/boundary edges" pressing ENTER instead of selecting edges will make all objects in the drawing to be cutting edges/extension boundaries.
I use the second option a lot of times, but lately I was having the problem with that option that the lines where being trimmed apparently where no objects existed. First I though that was a bug of the file, but when I realised that it was happening in all my files I decided to investigate. The answer was simple, for some reason de EDGEMODE system variable had been switch from 0 to 1.
The EDGEMODE system variable controls if the cutting edges are only the portions of the lines actually drawn or the entire extension of those lines. See this two images. THe fisrt one is with EDGEMODE set to 0. The horizontal line will be cut only by the left vertical line, since the one on the right does not intersect it.

But if we set the EDGEMODE system variale to 1, both vertical lines will be cutting edges, evenif the one on the right does not actually intersect the horizontal line.

I never use the EDGEMODE set to 1, but it is good to know it in case for some reason someone changes it.

Show me more...

SketchUp: Buy SketchUp 7 Pro with a $100 discount

Google is offering the new version of SketchUp with $100 off till May 15th
Català - Castellano - Deutsch
As seen on Arch Daily, Google is offering a discounted version of SketchUp 7 Pro till May 15th 2009. If you were considering going Pro, this is definitely the right time to do it. The Pro version retails at $495, to get the discounted version, go to the Google store and apply this discount code: SUAIA9.
If you are not yet ready to spend the money on the Pro version remember that you can download the fee version of SU 7 here. Remember though, that the promo code will only be good till May 15th.

Show me more...

SketchUp 7 Hands-On: Beginner and Advanced Exercises

A new Book for those wishing to learn more about this amazing 3D Software. A bit expensive, but the author has other great books already published.
Català - Castellano - Deutsch
Author Bonnie Roskes has Published a new set of 2 Books on SketchUp 7 called SketchUp 7 Hans-on: Basic and Advanced Exercises. The set is expensive (over 120 dollars for both books or around 60 for each one separately) but promising. Bonnie Roskes already published a year ago several sets of very good Books to teach SketchUp to Kids.

Show me more...

AutoCAD Weekly Block #04: Dynamic Vanity/Washbasin

Download this Blog and learn to use the Move action and distance multipliers to keep an object always centered
Català - Castellano - Deutsch
This week's Block is a Vanity with stretchable properties and that keeps the washbasin always centered. You can download the block clicking on the image below.

The block is pretty simple, it ahs only one parameter, the distance from one edge to the other, and two actions. The first action is a Stretch action to stretch the contours of the vanity. The second action is a move action to move the washbasin. I have linked both actions to the same parameter for simplicity and to show you how to keep an object centered when modifying a dynamic block. See the Block editor snapshot of the block.

We want the washbasin to stay centered when we stretch the block. This, if you think about it, means that for every unit we stretch the block, we want the washbasin to move 0.5 units.
To do this we need to set a distance multiplier for the move action. We can do that two ways. First one, when you create the action, at some point in the command line you will see this.

If you press M, you will be able to set the 0.5 as distance multiplier. The other option you have, in case you forgot to set this when you created the action, is to select the move action, and go to the properties tab. There, under overrides, you can set the distance multiplier.

What is the other option you see near multiplier? Offset. I will talk about it on next week's Weekly Block.

Show me more...

AutoCAD: How to Create a Custom Hatch Pattern with Text in it

This how I did it. It was a bit long but it helped me understand what to deal with when creating you own patterns.
Català - Castellano - Deutsch
On my last post, I analysed how the Hatch Pattern files work. How they define the patterns through straight lines and what is the syntax they use. I was not entirely satisfied with all I learned and wrote here so I decided to go from the theory to the practice and try to create my own hatch pattern file.
I decided to not attempt just a random pattern, but one that required certain precision. So I set the goal to create a pattern that would repeat the text Possible? yes it is.
The process started by creating the text. If you remembered what I wrote on the previous post, a pattern is created by straight lines with linetypes that we can decide that repeat themselves the way we decide to. So how would we do it to show a text on our hatch pattern just with some straight lines? We had to find a way to align the lines of the text on a way that they would repeat themselves in different directions. Let's see an image to understand this.

The text with the C circled in Red is the original one, the ones circled in Yellow are the ones I used to be sure the lines allign. See that this text has only lines at 0 degrees, 90 degrees, 45 degrees and 135 degrees. Alligning the o degree lines it is easy. The important part is to manage to allign the 45/135 degrees and do it in a way that the 90 degree ines also allign. In this case the fact that the tilted lines are 45/135 degrees makes it easy, if the there where other angles it would have been much more difficult. (The original text, created with the standard AutoCAD text style, had the lines on the upper part of the A at a different angle, but I modified that to make the pattern file more easy to create. See in the image below, how with the original text there was no easy way to find common lines for the A.

The process I followed once I had the text aligned is simple. First I started to set up the 0 degree lines (Remember to check the previous post for more details on the syntax of the Hatch PAttern files).Picking the lower left corner of the C as 0,0 point it was all a question of measuring distances. Something you need to know is that linetypes in hatch patterns can only use 6 elements from DASH SPACE or DOT. We define DASH with positive value, space with negative and point with a zero. See the hatch pattern definition of the horizontal lines and you will get a better glimpse of what I mean.

The text highlighted in yellow doesn't belong to the pattern definition, I added it for reference while building the pattern file. As you can see, although all the lower horizontal lines of the letters are aligned, I couldn´t define them in a single line definition because I would have exceeded the maximum of 6 elements for the line type definition.
Lets go back to how the pattern file works. The first number defines the angle of the line, the second and third (the second column) defines the start point coordinates of that line, the 4th and 5th number (3rd column) describe the delta-x and delta-y of the line. This point requires certain attention. Lets take for instance the horizontal lines. The delta-x and delta-y I had to use was -1.0607,1.0607. Lets see graphically what that means.

The last column might have no values at all (if the line is continuous), or up to 6 to define its linetype. For the lower horizontal lines for the letters C, D and d, the pattern file I created describes 0.1,-0.4475,0.1475,-0.7949,0.0508,-2.702 as linetype. THis means 0.1 of dash,0.4475 of space,0.1475of dash,0.7949 of space,0.0508 of dash,2.702 of space. Why is the last space so much bigger than the other ones? Because it describes the distance between the last dash and the first one on the next text. See the image below and compare the dimension values to the first 4 ones above.

The 6th value, on the 4th column, the one that is disproportionately bigger compared to the others, belongs to this dimension.

I after all this information you don't still feel like you could create your won pattern, I can only tell you that the best way is to try to create one. Suddenly all the abstract concepts you are reading will start making sense.
Just a couple of points I discovered while creating the pattern file. Be sure there is at least one blank line at the end of all the definitions, or AutoCAD won't accept the pattern. Also, once you have created the YOURPATTERN.pat file (or while creating it to test it) save it under the following where all the Custom Patterns are in AutoCAD. generally that folder is under C:\Documents and Settings\USERNAME\Application Data\Autodesk\AUTOCADVERSION\enu\Support\pats.
If you want to see or test the pattern definition I created., you can download it here. And below you can see a snapshot of the pattern generated by the file.

I know the pattern is not very useful for everyday life, but creating it was very useful to understand how to create a custom hatch pattern.

Show me more...

AutoCAD: Understanding the .pat Hatch Pattern Files

How do you define a new custom Hatch Pattern? Better understand how the .pat files work.
Català - Castellano - Deutsch
Searching for how to generate custom hatch pattern definitions in AutoCAD i came across this post by Ellen Filkenstein. Although the post gives you an idea on how these pattern definitions work, it took me a while to understand everything. So I went to the acad.pat file and I picked a complicated pattern to see if I could figure out how it works. I chose the AR-CONC pattern. This is a snapshot of it.

The first thing I realized disappointed me. I thought the pattern files could define any geometry, and somehow they do, but it turns out that any geometry created has to be based on straight lines. Let me show you why. Although the AR-CONC pattern seems pretty random, it is not. If you pay attention to it you will see that the triangles repeat themself on straight lines.

So, does the pattern definition describe a triangle and how often should be repeated? Not at all. A more detailed look to the pattern showed me that there is not such a thing as triangles in the pattern, but lines that intersect each other creating triangles (I know, that is the same almost, but not in terms on how you define the patter, see the image below).

So how are this lines defined to end up showing like triangles? Here is the tricky part. See the image below that belongs to the acad.pat definition for the AR-CONC pattern.

There are 4 elements that are important here:
  1. Defines de Angle that the line should take.
  2. Defines the X and Y coordinates of the start point of that line.
  3. Sets de Delta-x and Delta-Y displacements.
  4. Defines the linetype.
Ok, I know, this is textbook theory, I had no idea what this meant after I read about it. So I hatch some region in AutoCAD with this pattern and I searched for a line that was at an angle of 50 degrees. Surprise!! I found one. And suddenly everything made sense. It would take me long to describe it all so I made a quick diagram. See it below. The colors correspond with the numbers of the previous image for easy reference.

See how the angle (red) corresponds with the one described in the pattern file. The start point is 0,0. And here comes the juicy part. In Blue, the linetype. The pattern describes 0.75,-8.25. This means 0.75 units of dash, 8.25 units of space (the negative sign means space, 0 would mean a dot). And finally the file defines 4.12975034,-5.89789472 as Delta-x, delta-y displacement. See it in the picture with the green dimensions.
I guess now we can start defining our own patterns...or maybe not. Sincerely having the SUPERHATCH command available through the express tools, the process of generating your own pattern files seems a bit outdated. Of course the entities created with SUPERHATCH are blocks and not Hatch patterns, so they will give you much less freedom to edit them, so it is your choice to decide which method to use. I will talk soon in a new post about the SUPERHATCH command with more detail.

Show me more...

Maxwell: MXM Material Library

A link to the oficial Maxwell MXM Material Library
Català - Castellano - Deutsch
For those beginners using Maxwell Render like me, it is good to know that the Maxwell Render website has an excellent Material Library.
You will need to register to be able to download materials, but the library is huge and has tones of very good materials ready to be used in your renderings.
To help improve the library, the users can upload materials, but specially useful is to vote if the material is good so others have a reference to know if the material is worth downloading.
Searching the How To section, I found a website with some Tutorials on how to deal with Maxwell Materials, lighting, etc. I think it is worth checking out if you are trying to learn more about Maxwell Materials.

Show me more...

SketchUp Plugins: Create a 360 Degree Panorama

Do you need/want to create a 360 Degree View of your model? There is a plugin for that.
Català - Castellano - Deutsch
The Plugin Cubicpanoout.rb allows us to export 6 images to generate a 360 degrees panorama. The plugin exports the 6 images of the imaginary cube around the point were the camera is.
Be sure to have the "use sun for shading" check box activated or the "display shadows" option. Otherwise, SketchUp changes the color of the faces of objects slightly depending on the camera position, making it impossible to match the pictures afterward.
Place the camera on the center of your scene using the Position Camera Tool of SketchUp (the icon with a man standing on an "X"). After this, the process you need to follow is simple:
  1. Go to Camera --> CubicPano Out
  2. Save the Images
  3. Use a panomaker to create the 360 quicktime movie (see next)
To put the pictures together you will need some panorama making program. Not all of them will work, since the images generated with this plugin don't have any overlapping areas. GoCubic will do the trick if you are using a PC, and it is free. You can download it here. If you are a MAC user you need MakePanoVR. (I couldn't find were to download it).
See the result:

The process is quite simple. Thanks to Jake Ludington on How to embed a Quick Time movie.

Show me more...

AutoCAD: Weekly Block #03 - Multipurpose Sports Court

Download this Block and learn about Visibility States for Dynamic Blocks
Català - Castellano - Deutsch
This week's block intends to show you how to play with the visibility parameters of dynamic blocks. The idea behind the Block is to be useful when showing multisport venues (I have to say that this block is mainly useful for European Countries where combining a Basketball court 28x15m with a Handball Court 40x20m is the common practice. See too, that the Basketball court block is based on the FIBA regulations, not NBA or NCAA).
To give you a better idea see a snapshot of the block. You can download the block here or clicking on the image.

The block consists of 2 other Blocks Embedded in it. One for the Basketball Court, and one for the Handball Court. But because I wanted to use a single block to show the different possibilities (i.e. Basketball court Alone, Handball Court Alone or Both together like in the snapshot) I added visibility states to achieve it.
To do that once the block is created, you need to open the Block Editor and add a parameter. When asked which parameter you want to add, type "V" for visibility. Once the parameter is set, you need to create the visibility states. This can be easily done with the controls on the upper right corner of the Block Editor interface. See the image.They are the following.

  1. Toggles objects on other visibility states on and off.
  2. Makes an object visible in the current visibility state
  3. Hides an object form the current visibility state
  4. Calls the visibility states dialog box (where we will create different visibility states)
So the steps we will follow are:
  • first we have to do is click button #4 and create a new visibility state called Basketball, antoher One Called Handball and rename the existing one as Both.
  • Having Basketball visibility state active, select the Handball court and click button #3 to hide it. (the court will diappear if you didn't click button #1, if you did the court will fade)
  • Turn Handball visibility state active, select the Basketball Courtand hide it (button #3)

Pretty simple isn't it? Now exit the block editor (saving the changes) and see how when you select the block there is a new grip that when you click on it will show the 3 visibility states. Pick the one you want and you will see if you did the process right.
If you want to repeat the process I showed here you can download this block that doesn't have the Parameters and Visibility states Added.

Show me more...