CADcaster

CAD News, Updates and Community

Browsing Posts tagged file

swirl Using template will increase your productivity. We are not just talking about AutoCAD, but also Revit, Inventor, and any other software like Microsoft Word, Excel, etc. In this tutorial, we are going to prepare our template, save it, and a little configuration to tell AutoCAD to use our template each time we create a new file.


So What is a Template and Why Using It?

Template is a file you use to start a drawing (or any other documents). By default, almost every documentation software provide it. But the default template usually only provide very basic configuration. And mostly don’t meet your criteria.

When you started AutoCAD, by default it will use acad.dwt template. It holds minimum information you need to create a proper drawing. It use inch as units. For me who use metric units, I have to change it to mm. Then I have to do this following things:

  1. Create layers and set their properties.
  2. Create styles for text, dimensions, and other annotation.
  3. Setup my layout for plotting
  4. I don’t usually do this, but I saw some AutoCAD users create block symbols. I prefer to keep them in a block library.
  5. Then I start drawing

Imagine that I have to do that steps each time I start a new drawing. How many hours that I waste in a month? In a year? Wouldn’t it be nice when we start our drawing, we start directly from point no. 5? That’s what a template for. We set our common settings and styles.

Create a new file. Use AutoCAD menu or type NEW [enter]. DO NOT use new icon from quick access toolbar. Using file>new or typing NEW will load a dialog box to select a template. If you use icon from quick access, it won’t open.

Now, because we started using metric, then we use metric template. You can also try to use imperial later.

Preparing Layers

Layers is one of the basic configurations. We will add some layers to this template. Remember the file we created before? The one that contain walls, columns, doors, and centerlines? We will import layers from that file. Check on your layer manager, by default it only contains layer 0. If you see other layers, just remember it.

Open design center. You can click on ribbon>view tab >palettes. Or simply type ADCENTER [enter].

Design center is basically looks like explorer. Find your file. In windows explorer you can expand until file name, but in Design Center, you can see what’s inside an AutoCAD file: layers, dim styles, etc. Click on layers, select all layers you created before. Drag and drop to your drawing area.

design center

Now check in your layer list. Is it already there? :)

Preparing Dimension Styles and Table Styles

I’m not going to write in details how to define a dimension style or table style. If you are new to AutoCAD and interested to know, I can write it in separate post. But I believe many of you who read this already familiar with dimension styles and table styles.

  1. Create a dimension style. We are going to create a plan to be plotted at 1:50 scale. So create a style with name ’1-50 scale’ with arrow size and text height 150, and offset from dimline with 40 unit distance. Create another one with scale 1:100. Give it arrow size and text height 300, and ‘offset from dimline’ with 80. If you have other common scales to use, create it too.
  2. Create a table style for 1:50 scale. Give it text height 150 and margin 50.

Set the new styles for 1:50 for both dimension and table as current.

Preparing Our Layout

The last common setting we are going to set it Layout/Page. You can refer to this post on how to do it. Create several page setup for most common paper size you use. I created 1:50 and 1:100 in this example.

layouts

Save your template. Use save as, then change files of type to ‘AutoCAD Drawing template (*.dwt)’.

saveas

Setting Our Default Template

We are almost done! The last thing we need to setup is telling AutoCAD to use our new template. There are several ways to do this. You have to remember that AutoCAD use default template acad.dwt every time AutoCAD started. You can select default template for QNEW command, but not working if you started AutoCAD. I don’t know if there’s a work around, but honestly I can’t find it. Share it if you know how to do it. So, we can set it by doing this:

Use STARTUP menu:

Set STARTUP system variable to 1. This will load a dialog box that allows you to choose which template you wanted.

file new dialog box

This was a default in older AutoCAD. I don’t know why Autodesk decided to change this sys var to 0 by default. This is a good choice if you have many templates to choose before you started to draw. This work for all version of AutoCAD. Well at least I use it since AutoCAD R.14. I don’t know if they have it in older version.

Alternatively, you can do this to:

AutoCAD 2009 or Older

Backup your acad.dwt. Place the template we’ve created in default template folder,and rename it to acad.dwt.

AutoCAD 2010 or newer

Go to option, user preference tab. Click on Initial Setup button. You will see a wizard that allows you to choose your industry (page 1), your workspace (page 2) and your default template (page 3).

Setup default template for QNEW

The last one, set your default template for QNEW. If you type QNEW or select new from quick access toolbar, this is the template AutoCAD will use. You can find it in option, files tab. It’s under template settings.

default template for QNEW

Now we’re done!

Testing our Template

Try to create a new file, and see your layer list, dimension styles, table styles, and layouts! Try to exit AutoCAD, and see if it also works.




Source: CAD Notes – Preparing Your AutoCAD Template
Go to Source: CAD Notes

If you’re using AutoCAD for long period of time and you know how to use the AutoLISP and the importance of it. You probably know how to load the AutoLISP file in AutoCAD, and you certainly don’t need to read this tutorial. But if happens that you are relatively new on using the AutoCAD and you want to expand your knowledge in this drawing application software, then this tutorial is for you.

AutoLISP a Brief Description

AutoLISP is based on the LISP programming language, which is simple to learn and very usefull in everyway. AutoLISP Applications or routines can interact in AutoCAD in many ways. These routines can prompt the user for input, access built-in AutoCAD commands directly, and modify or create objects in the drawing database. By creating AutoLISP routines you can add discipline-specific commands to AutoCAD. Actually, some of the standard AutoCAD commands are AutoLISP applications. Knowing how to load and use these routines can enhance your productivity.

Loading the AutoLISP

There are two methods to load an AutoLISP file, one is loading it by using the Customize User Interface editor or CUI, the other is by using the command Load Application or simply APPLOAD. Customize User Interface editor can be found by clicking the CAD Manager pulldown menu, then Customize, then Interface (fig.1).

Fig.1Fig.1

Alternatively at the command prompt, key-in CUI. Then in the Customize Interface editor tab, in the Customizations in all CUI files pane, right-click LISP files, then click Load LISP. Then in the Load LISP dialog box, locate and select the AutoLISP file you want to load. Remember only files with the extension LSP can be selected here. After you selected the AutoLISP file that you want, click OPEN.

Fig.2Fig.2

Load Application or simply APPLOAD, using this command is the easiest method in loading an AutoLISP file. You can find this command under CAD Manager pulldown menu on the same place where the Customize User Interface can be found. Or at the command prompt key-in APPLOAD. The good thing in using this method is, not only the AutoLISP files can be loaded but also some other AutoCAD Application files as well. Such as ObjectARX files (arx), VBA files (dvb), ObjectDBX files (dvx), Visual Lisp Executables (vlx), and Fast-load AutoLISP Format (das) [Fig.3].

Fig.3Fig.3

More of this method here in this post Free AutoLISP Routine.

Related Posts

Source: PinoyCAD[dot]net | Your Daily dose of AutoCAD Tutorials – How to Load an AutoLISP File
Go to Source: PinoyCAD[dot]net | Your Daily dose of AutoCAD Tutorials

If you tried to set an image transparent with the normal transparent tools you found out it only works with one color. If fact all it does is turn off that color you select and is not really making anything transparent. Transparent as defined by Merriam-Webster is “fine or sheer enough to be seen through”. There is no see though when you just turn off a color. Using the data connect with FDO we can make polygon features transparent should we be able to do the same for images? Well we can with a little trick.

First we need to use the data connect to add the image to our map. Then save the image layer to “LAYER” file. When you save the layer it creates a file with an extension of layer,  If you are not aware of what a layer file is, it’s an xml file that contains information on the data file as to how it is connected to the map, the data it contains (spatial & data),  and how it is displayed or theme. Once you saved the image file to a Layer remove that image layer from the display manager and disconnect from the file(s) in the data connect palette.

Now browse to the image.layer file you created and open it in “Notepad”. Scroll down until you see the tags;

“<FeatureName>rasters:Name</FeatureName>” “<Geometry>Image</Geometry> “

Now insert between the two tags

<Opacity>0.5</Opacity>

layer_edit

Save the file after you edited it. The number 0.5 is the amount of transparency with the larger the number the more transparent the image will be. 0.9 is almost translucent and 0.1 is of little transparency. Now use the Load Layer tool from the Data Icon in the Display Manager to add the image to the map.

So why would anyone need an image to be transparent to start with when we can place it at the bottom of the draw order and make all the other layers transparent?  First off, how often have you reopened the map to find out the draw order was not as you had it set when you closed the map drawing? Another reason you may want to set an image to be transparent would be if you have overlapping images in the map. Maybe you have an current aerial image and an aerial of the same are that is 10 yeas ago and you need to do a time lapse study of the area. Toggling the images on and off can get frustrating after a while, where as having one transparent will allow you to see though it to do the analysis a lot easier.

Here are a few before and after screen captures of the results.

Normal

How we normally do it with the image layer at the bottom of the display draw order and the polygon with transparency.

image_Transparency

Here is with the image with transparency at 0.5 and the image layer at the top of the display draw order.

closer_look

A closer look of the above. Notice how the street centerlines show though the image file.

If you look close enough you will see a grid pattern in the image after we make it transparent, I only guess that is the way Map3D renders the image but after a test print of the map the grid is not getting plotted so I see no harm in it being there. Also do not forget about the MAPPLOTTRANSPARENCY command if you want to plot with transparency.

Source: Map 3D and Murphs Law – Transparency of Images
Go to Source: Map 3D and Murphs Law

I have heard this request many times so putting it up over here. The whole credit for this should go to Stefan Berlitz of http://solidworks.cad.de/ http://swtools.cad.de . Without his wonderful macro, this option might not have been possible.

Before starting the process I will strongly advise you to make a backup of the files.

  1. Open you part, [...]

Source: SolidWorks Legion – HOW TO CHANGE EXISTING SW FILE SYSTEM OPTIONS
Go to Source: SolidWorks Legion

mud_wrestling

“Why would I use reference file? I can use blocks to manage my typical design…”
True, some people use blocks to draw typical designs. When they need to change the design, they can simply edit one block definition, and all blocks using the same definition will be updated. I saw an architect use blocks to create a site plan. Each building is defined as a block. I consider he is lucky his file is not corrupt with such a complex objects.

XREF on the other hand, harder to manage for them. Many times some files are left behind. And people who receive their files might not be familiar with XREF. Blocks and XREF are two different animals. So when you should use blocks, and when you should use reference files?

Let’s take a look at AutoCAD tool palettes. Autodesk provide us several block samples there. And don’t forget to look at several samples in design center files.

palette

They contain several objects and symbols that we can use. In other word: it’s a library. We use blocks as reusable contents. Let’s say you have furniture blocks. It’s your library, and you can use it over and over again in your other drawings.

Let’s imagine it in the real world. You’ve placed a table in a room. When you don’t feel it’s appropriate, you don’t modify the table. You replace it with other type of table. That’s how blocks supposed to work. This become obvious when I started to learn MicroStation. You can’t modify placed cells (they call block in MicroStation with cell), but you have to replace them with other cell definition. You can do the same in AutoCAD now, with an express tool command: BLOCKREPLACE.

Blocks in AutoCAD become more and more useful. Now you can create a report based on blocks you use in a drawing. You can use Data Extraction to do this. Let’s say you draw electrical schematic drawings. You can have circuits, lights, buttons, fuses, etc blocks as electrical symbol library. The symbols can have attributes that contain the components code, serial number, and all other data you required. Of course, they have to match the real components on the market. You don’t change it and create your own type to match your design. Some major companies already have default block definitions on their server. Only some people are able to modify and responsible for the blocks: the CAD manager. All other cad users can access and use them in their design. That’s how blocks are supposed to work.

What about reference file (XREF)? Do you know how people used to collaborate in the old days? They use transparent paper and place it over other engineers drawing. When the architect has finished the drawing, the structural engineer use it as an overlay, and create their own drawing on the transparent paper. And so do the MEP engineers. I believe it’s the same concept.

The design can change, and the others can refer the design changes by comparing their drawing with the same way. Now, blocks and XREFs begins to look different, aren’t they? What is similar to blocks in ancient way of drawing? You can dry transfer the graphical elements, the sample of one brand I know is Letraset. It was your reusable content before people use computers to draw.

So what is the advantage of using XREF? Using XREF means we work with multiple files. We all know that when a file is opened, then no other user can open the same file (except as read only). When you use multiple files, it means multiple users can open each file and work concurrently on the same project. They can refer to other drawings as an overlay, and able to track changes easily.

Separate your design to multiple files also will keep your files simple. Simple means less trouble. If you have a very complex drawing, with a lot of nested blocks, your file can easily get corrupted.

Now let’s go further. If you are familiar with setting permission on a network, you should know that we can set different permission on a folder. The MEP engineers can use architects drawings as overlay, but can’t modify them. And vice versa. This is a good practice to manage and protect your data. If you want advanced data management, you can consider using Vault.

So what about sending the files? We don’t want some files are left behind, or the recipient confused where they should put the files. You can simply use eTransmit. You won’t leave any file by using it.

Do you want to share how you use blocks and reference files?




Source: CAD Notes – Block vs XREF
Go to Source: CAD Notes

As I mentioned in my last post, I had some reservations about the code provided by Autodesk to deal with suspect acad.vlx and logo.gif files. Based on a suggestion from Jimmy Bergmark, I have written my own, safer version which you can download here: clean_virus_safe.lsp.

The comments at the top of the clean_virus_safe.lsp file explain what [...]

Source: blog nauseam – AutoCAD virus protection update
Go to Source: blog nauseam

Shaan Hurley has posted some useful information about another AutoCAD-based virus that is doing the rounds, and I strongly suggest you read it. However, I have some reservations about the solution that is posted there and in the Autodesk knowledgebase.

The LISP code suggested will delete any files called acad.vlx or logo.gif that are located in [...]

Source: blog nauseam – Another AutoCAD malware warning
Go to Source: blog nauseam

blue_screen_of_death I’ve seen a lot of people snapped when their AutoCAD showing the deadly fatal error message. Of course, the first one to blame is AutoCAD. After using and troubleshooting AutoCAD for several years, I found out that it’s not always AutoCAD problem. There are a lot of things can cause this. Bugs maybe there, but many times it is not caused by it.


Eliminate Them!

First, you have to eliminate the possibilities: is it machine specific? Or is it file specific? I think it might be cruel to say it can also human specific, but how people using AutoCAD can cause this.

Try to reproduce your problem. Does this occur on all of your machine? Does this happen when you open a specific file? Try to open your file on different machine, and see if it also cause error there. Also try to create a new file from scratch using default templates and see if this still occur.

I saw an AutoCAD user always create his drawing from his previous drawing. He was too lazy to redefine all of the styles and settings he needed. And he didn’t aware about creating a template for this purpose. So he open his old file, create his drawing, and delete objects he didn’t need. That’s a bad workflow. This will cause your file become more and more complex. A lot of objects can make your file corrupt. This problem never occur when he still use his old AutoCAD (i forgot the version) and when he is assigned to another division, using AutoCAD LT 2007, this error starting to show up. Of course, he blame his AutoCAD LT. I don’t know why this never show up before. Maybe because Autodesk has changed the file format, file header (to recognize if this file is a trusted DWG?) or may be because the application is become more and more complex it become more vulnerable. I told him to try create a new file, and draw with it. The problem is never show up again. This is a file (or human?) specific problem.

The next problem I know is it’s conflicted with antivirus or spyware application. Or may be even a virus. I never experience it, but saw it in Autodesk knowledge base page. If this occur after you installed an application, it might the one who caused it. It can also because your Windows just installed an automatic update. I found this happen, and saw this in knowledge base page. It suggest me to install a service pack.

So it can caused by software bugs. Sure, you should send CER (customer error reports) when it show up. If there are any similar issue has been solved, Autodesk will email you what you should do. You can read more about CERS in Shaan blog.

The other thing that can cause this, is hardware problem. I experienced this by myself. I added physical RAM to my PC, and when my drawing gets bigger, the application is just crashed. It is easy to see because it happen to all of my application. So I just remove it, and the problem is gone. It is slower, but more reliable.

Are there anything you would like to share?




Source: CAD Notes – What Caused Fatal Error Messages in AutoCAD?
Go to Source: CAD Notes

old_fabric_1 When you create a new AutoCAD file, can you see this layer? No, unless your template file has it defined. This layer will be created automatically by AutoCAD when you create dimension. Try to create a dimension, then look again in your layer list. What is this layer for?

This layer is used for definition points when you place dimensions in AutoCAD. This layer by default is set not to be plotted. Don’t mind this layer. Why worry about one layer when you can create virtually unlimited layers?

The problem is, many use this layer when creating objects they don’t want to plot. Viewports for example. This is practical before, we can’t define a no-plot layer. Now that we can create a no-plot layer, we should avoid using this. Why?

Layer defpoints is somehow linked to Layer 0. When we freeze or thaw layer 0, you can’t modify objects in layer defpoints. You probably know it, but someone who receive your file might not.

The other reason is, when you run audit, all objects that’s not definition points will be removed to a new layer: $AUDIT-BAD-LAYER. You can read the explanation here. There is no explanation whether this will make your files corrupted or not. But if audit treat it as ‘bad object’ then it must be a good reason for it. You don’t want to see the ‘deadly’ fatal error message, do you?




Source: CAD Notes – Defpoints Layer
Go to Source: CAD Notes

license file I found this problem when I installed AutoCAD and Civil3D network license on the same license server. I can’t make them both work! If I started AutoCAD license service first, then Civil3D service won’t start. And vice versa. I saw in the log file saying something about the port is already being used. Then I tried merge the license files into a single file, try to start the service again. It works!


Why We Should Merge Them?

I have this explanation from my colleague that have configured LM Tools for years. He said that all Autodesk product using the same daemon (adskflex). So, if there’s already a service using that daemon, you can’t run separate service using that daemon. To solve this problem, we have to combine them, and run them as one service.

If you have several application licenses managed by LM Tools, combining them is easier to administer. You might want to consider doing this.

Merging Your License File

License file can be edited by using notepad. Open them both and merge them in a master license file. There’s a good example in Autodesk knowledge base on how to merge license file. You can use it if you have more than one product to be managed with LM Tools.

But if you have different applications that not from the same vendor, let’s say you have Unigraphics and Inventor, it’s a little bit different.

Basically, the license file structure is defined like this:

SERVER server_name physical_address
VENDOR your_vendor_name
INCREMENT some_codes
INCREMENT another_codes

Let’s see this example from Autodesk knowledge base page.

SERVER servername 0123456789ab
USE_SERVER
VENDOR adskflex port=2080
INCREMENT 48800ACD_2006_0F adskflex 1.000 permanent 5 \
    VENDOR_STRING=nfr:permanent BORROW=4320 SUPERSEDE DUP_GROUP=UH \
    ISSUED=01-Sep-2006 SN=123-45678900 SIGN="06DE F4C2 998E ABD3 \
    2413 D3A0 77EB 0CCE 203C 7BEA 73A3 25F5 0A8D EA5E E26D 1C18 \
    968B BE2E 966D C293 AEF0 97F5 9776 057F 652C 6050 D904 A755 \
    5A35 7909" SIGN2="1A49 5DFA 4C92 D6DC BD74 7D15 6B3F 730D A342 \
    EEBC C63F 1838 FFBC 2CD8 B6E0 0113 0E3D 540F AE73 C8B4 C90C \
    BA1F 049D 9464 0477 8D53 06AD 0992 5B16 3A92"

Here’s the structure if you have license file from a different vendor.

SERVER server_name physical_address
VENDOR your_vendor_name_1
VENDOR your_vendor_name_2
VENDOR your_vendor_name_…
INCREMENT code_from_vendor_1
INCREMENT code_from_vendor_2
INCREMENT code_from_vendor_…

Notes: Server name and physical address must be identical.




Source: CAD Notes – How to: Combine Your License File
Go to Source: CAD Notes

Powered by WordPress Web Design by SRS Solutions © 2010 CADcaster Design by SRS Solutions