找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 610|回复: 0

[转贴]:AutoCAD Tips&Trix

[复制链接]
发表于 2004-4-6 20:16:53 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
AutoCAD Tips&Trix

Do you need a freeware viewer for DWG files in 2004 format now that Autodesk doesn't have a free alternative to Volo View Express? Here are two alternatives. I prefer the first one though.
Free DWG Viewer powered by Brava
Bentley View
  
Example how to add personal mtext symbols like below:(如下图)


(defun PersonalMtextSymbols ()
  (vl-load-com)
  (setq key (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\MTEXT\\Symbols"))
  (vl-registry-write key "Name 1" "Name")
  (vl-registry-write key "Name 2" "Company")
  (vl-registry-write key "Contents 1" "Jimmy Bergmark")
  (vl-registry-write key "Contents 2" "Pharmadule Emtunga")
)

TrueType® text objects are filled in plot preview but not in plotted output
http://support.autodesk.com/getdoc.asp?id=TS67821
Recover damaged drawing when RECOVER command is not successful
http://support.autodesk.com/getdoc.asp?id=TS19369
You want to select a solid hatch and have a hard time to select it. If the hatch is rectangular try to select on an imaginary line going from the lower right corner to the upper left corner. You can also try using select crossing. Another way is to click on the boundary of the hatch and use CTRL to cycle between the objects and make sure you select the correct object.

Undocumented
3DCONFIG has a hidden option that is not documented. Try enter V and you will see this:
Command: 3DCONFIG Configure: 3DCONFIG
Enter option [Adaptive degradation/Dynamic tessellation/Render
options/Geometry/acceLeration/eXit] <Adaptive degradation>: V
Configure: adVanced
Enter option [Redraw on window expose/Cache viewport draw geometry/Display
lists/Fast hidden line only/Pixel Deviation/eXit]
Undocumented commands are +CUSTOMIZE, +DSETTINGS, +OPTIONS, +UCSMAN, and +VPORTS. With the '+' sign before the command name AutoCAD ask you to enter the index for the tab that will be active in the dialog box. +PUBLISH is another one.
The undocumented SPACESWITCH system variable can be used to allow or forbid switching between between paperspace and floating modelspace with a double click.
FNSPLITL (File Name Split To List) is an undocumented lisp function. It returns a list of (path filename extension). Example: (cadr (fnsplitl (getvar "dwgname")))
What is QAFLAGS?

QAFLAGS been used a long time (<r12) by developers and autodesk themself too.

QAFLAGS acceps a value between 0 and 32767
bit 0 (1) : ^C in menu macro cancels grips (acts like keyboard <Esc>).
bit 1 (2) : no pause during text screen listings.
bit 2 (4) : no "alert" dialogs (text display instead).
bit 7 (128) : accepts "screen picks" (point lists) via (command) function.

Normally QAFLAGS should be set to 0. Because it might be set to other values it is a good idea to put (setvar "QAFLAGS" 0) in acaddoc.lsp or any other of your lisp files that you use for startup.

Xref
Q: I have problems binding xrefs.

A: Ideas how to resolve problems with binding xrefs.

Try to PURGE both the drawing with the xrefs and each xref.

If there are nested xrefs unloaded you have to either detach them or set them to overlay

Try to bind the xrefs one by one and close and open the xref dialog box for each time and find if there is a specific drawing you cannot bind.

If you find one or more xrefs that are not bound try to attach them one by one into a new empty drawing. Now try to bind. This can give you a hint of where the problem resides.

If the xref contains proxy objects there might be an "Invalid" message. To resolve the problem try to find an object enabler. To have a hint of if there are proxy objects and what application have created them set the system variable PROXYNOTICE to 1 and reopen the drawing. If a notice of proxy objects are displayed try to find the missing application. AecArchBase is for example Architectural Desktop. Be sure that the Show Proxy Objects option is selected on the Open and Save tab in the Options dialog box. If you are allowed to (since this destroys intelligence and maybe some geometry), you can saveas DXFr12, close the drawing, open it again and then save as DWG2000-format. This might even be necessary to be repeated twice. Try wblocking everything into a new drawing and attaching it instead of the old. You can use QSELECT to find proxy objects. Look for the Object type: ACAD_PROXY_ENTITY. Observe that if they are nested in blocks you have to explode all blocks one or many times to find it.

Try to recover and audit both the drawing and the xref file.

Check if there is a block in the xref file with the same name as the xref itself. If so rename one of them.

It might be possible for the one creating the xref file and having the custom application to explode the objects into plain AutoCAD objects.

To detach an xref that exists in multiple layouts: In each layout, erase the object representation of the xref you want to detach. From the Insert menu, choose Xref Manager. In the Xref Manager, detach the xref.

There might be blocks with no name.

If you are unable to detach multiple references. This error can occur when you try to detach an xref that is used in multiple layouts. For example, you might have referenced the same title block into multiple layouts. Make sure that you have purged the drawing as well.

Try do detach, attach and bind.

Try this on another PC. Sometimes a reboot has helped.

If nothing else is working detach the xref and insert it with INSERT command. But first check the inserting point, scale, rotation, layer, if it's clipped and so on.

Look if you have blocks with invalid names like "70/50/30" in the xref you cannot bind. <>/\":?|,=` are invalid characters in block names.


Plotting
Q: How can I plot with previous plot settings from the command line to use in scripts or in a LISP program?

A: (command "-plot" "no" "" "previous plot" "" "" "" "")   



Q: How can I plot by code and set it to plot more than 1 copy?

A: Following work to plot 3 copies using the previous plot setting from the command line:

(progn
  (command "-plot" "no" "" "previous plot" "" "" "Y" "N")
  (setq plotnr 3)
  (setq ad (vla-get-activedocument (vlax-get-acad-object)))
  (setq plot (vla-get-plot ad))
  (vla-put-NumberOfCopies plot plotnr)
  (vla-PlotToDevice plot)
)

Notice that you can't change the setting in the plot dialog box. If you want
to do that you have to do it from outside AutoCAD like this.
1) Start an external application like (startapp "f:\\SetPlotNo.exe"), could
be done with VB as follow.
2) Make sure that the active tab of the plot dialog box is the first one,
could be done setting the following registry to 0,
HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R15.0\ACAD-1:409\Profiles\AutoCA
D 2002\PlotSettingActiveTab
3)  Open the dialog box by using SendKeys to AutoCAD.
...
    AppActivate AcadApp.Caption
    SendKeys "PLOT ", True
    SendKeys "%b ", True
' No of copies
    SendKeys "3", True
...

This might give you some ideas...



dbConnect
Q: I want want to easy copy links/queries/labels created with dbConnect from one drawing to another.

A1: Create an empty drawing with only the links/queries/labels you want, let's say you call it dbTemplate.dwg. To easily have them into an existing drawing you only have to insert dbTemplate.dwg and explode it and there you go. This could easily be done on a button. Observe * before the drawing name makes it explode. -insert *dbTemplate.dwg 0,0 1  0

A2: Open dbConnect Manager with CTRL+6. Drag and drop the links/queries/labels from one drawing to another.

Q: The labels disappears after I reloaded them. Where are they?

A: You have probable used a wrong field as key. It has to be a field that is unique.

Installations
Q: My silent install doesn't continue to the end.

A: Check the C:\WinNT\AcadDeploy.log (or in C:\Windows) file that might give you some hint of what has happened. One reason might be that there is no place left for the installation. You can also try to run the following file that you'll find in you share installation folder. \IMAGE\client.exe

FlexLM
Q: How can I easily distribute environment variables to set LM_LICENSE_FILE?

A: Create a registry file named license.reg looking like below where EMTNT04 and ARNNT02 are the names of two servers, change to fit yours or you can use the IP address.

REGEDIT4
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment]
"LM_LICENSE_FILE"="@EMTNT04;@ARNNT02"

This can then be called in a command file like this:

regedit /s \\servername\sharename\license.reg



Q: Is it possible to use version 8.3c (or newer) of FlexLM?

A: Yes, we use it without any problems. Running both AutoCAD 2002 and AutoCAD 2004 has worked well.



Q: How can I check the status from a client PC?

A:  have an cmd-file on client machines so it's possible to check the license status without doing it on the license server. Example below, where arnnt04 is the name of the server. The path to lmutil must be changed to work for you.

@echo off
"M:\CAD\LMTOOLS\cmd\lmutil" lmstat -a -c 27000@arnnt04
pause

ADT
Q: Tips on ceiling grids?

A: Ceilings don't need to be drawn in the base plan, you can do them in xrefs even on small projects. A great way to make frids is to go to a reflected display & use Bpoly to create ceiling boundaries, then convert to
ceiling grids.
   Q: How can I change the title bar to say AutoCAD instead of Architectural Desktop?

A: Have a look here to download the code.

AutoCAD Command and System Variable Map
To download PDF version (90Kb) Click Here

ADC - AutoCAD Design Center
Do you miss preview images/icons of blocks? Use the command BLOCKICON. It generates preview images for blocks created with Release 14 or earlier and even A2k.

You can get ADC to navigate to a specific folder, drawing or even custom contents like layouts.

You can start ADC like these examples, (can be placed in a custom menu for easy access):

(command "._adcnavigate" "r:/cad/r15g/blocks/")
(command "._adcnavigate" "r:/cad/r15g/blocks/template.dwg/")
(command "._adcnavigate" "r:/cad/r15g/blocks/template.dwg/layouts")

;;; Navigate to current drawings path
(command "._adcnavigate" (getvar "dwgprefix"))

(callADC "r:/cad/r15g/blocks/" "template.dwg" "layouts")

(defun callADC (path fname custcont)
  (if (/= fname "") (setq fname (strcat fname "/")))
  (command "._adcnavigate" (strcat path fname custcont))
)

Arguments

path a valid existing path
fname an existing dwg or dwt-file
or an emty string: ""
custcont any of (blocks" "dimstyles" "layers" "layouts" "linetypes" "textstyles" "xrefs")
or an emty string: ""

Mouse
To make your work with AutoCAD more effective you should invest in a IntelliMouse compatible mouse. Personally I've been satisfied with IntelliMouse Explorer that doesn't jam like an 'ordinary' one.  
The following table lists the IntelliMouse mouse actions supported in AutoCAD.

To ... Do this ...
Zoom in or out  Rotate the wheel forward to zoom in, backward to zoom out
Move the mouse to the point you want to have as center when zooming.
Zoom to drawing extents  Double-click the wheel button
Pan  Press the wheel button and drag the mouse
Horizontal and vertical pan Press Shift and press the wheel button and drag the mouse
Joystick pan Press Ctrl and press the wheel button and drag the mouse
Change the zoom factor Set the system variable ZOOMFACTOR (Default is 10%). But this makes it too slow so raise it to 50 or what you feel is comfortable.

Did you know that you can use this functionality when in the orbit command too?

You might want to disable the scroll bars in drawing window since it might interfere with scroll-mouse.

Remember also to set MBUTTONPAN to 1.

If you have another mouse you might have to :

1) Set wheel button 2 option to "Middle"
2) Turn on "use Office 97 compatible scroll only"
3) Set the Scrolling size option to "None" if not the first two worked.
4) Do you have the latest driver?

How can I know where my drawing is inserted as an xref?
Use DesignCenter or Ctrl+1 and Find Button.

There you have the option to search for xrefs in many drawings.
There is also possible to find Blocks, Dimstyles, Drawings,Layers
Layouts, Linetypes and Textstyles.




This page was updated: 2004-03-31
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2025-9-27 05:29 , Processed in 0.192906 second(s), 32 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表