Minggu, 11 September 2011

Knowledge detail


How do I make use of layer filters?

Q: How do I make use of layer filters?
A: Follow these steps to create a new layer filter:
  1. Enter a name for the layer filter, such as TEST.
  2. Set up the layer filtering condition you want. For example, choose “Yellow” in the color item.
  3. Finally, click the Add button, and then click Close.

In the Layer Properties Manager dialog box, choose TEST, and ZWCAD filters all layers that are set to yellow.




Kamis, 08 September 2011

Knowledge detail


Can I turn dynamic prompt off?

Q: There is always text near the cursor showing the prompts of the current command. Can I turn it off?
A: This prompt is called the “dynamic prompt,” and it indicates the current function you are using. Because it is near the cursor, it can be quite useful. In some cases, you may not want it there. You can turn it off by entering the following command:
Command: dynmode   (Press Enter.)
New value for DYNMODE: 0   (Press Enter.)
Once it is off, you can turn it on again by setting dynmode = 1

Alternatively, you can turn it on and off by clicking the DYN button on the status bar (at the bottom of interface), as illustrated below:

Selasa, 06 September 2011

Knowledge detail


Convert .plt files to DWG



 Question: I have a lot of .plt (HPGL plotter) files. I would like to convert them to .dwg files in ZWCAD. Is there a function available to do that?
Answer: First of all, you need to make sure that the .plt files were created with a printer, plotter, or program that output the drawing in HPGL Standard format. For instance, they were plotted by the Generic SHPGL plotter or Generic LHPGL plotter driver in AutoCAD. To convert them, use PLT2DWG command.

Senin, 05 September 2011

Knowledge detail


Isolate a layer



Q: There are many layers in my drawings. Is it possible for me to isolate just one of them?
A: Just input the LayIso command, and you are prompted for the name of the layer to isolate. (The other layers are not displayed.) If you want to return the layers to their normal state of visibility, enter the LayUniso command.

Minggu, 04 September 2011

Knowledge detail


Remove duplicate entities


Q: My drawings have a number of duplicated entities. I find them  annoying. How can I delete them?
A: There is a function that removes duplicate entities, and here are two ways access it. You can enter DelDupl at the command line and then delete the duplicate entities; or, you can access the command from the menu: Choose Express, Draw, and then Delete Duplicate Circles/Arcs/Lines.

Minggu, 07 Agustus 2011

Knowledge detail


Add revision clouds to a drawing




Q: I cannot figure out how to add revision clouds to my drawings. How can I do that?
A: You can enter the RevCloud command, which runs the revision cloud function at the command prompt. (Alternatively, you can access it from the Express menu: choose Draw and then Revision Cloud.)

Senin, 01 Agustus 2011

Knowledge detail

Align text along arc


Question: I want to draw a small label in the drawing, but I want to align it along an arc. How can I do this?
Answer: In ZWCAD, you can use the Arctext function from Express tools. From the Express menu, choose Text and then choose Arc-Aligned Text. Place the label aligned with an arc.

Kamis, 28 Juli 2011

Knowledge detail

Layer properties Manager

Q: Why do some options of Layer Properties Manager seem to not work?
A: As shown by the figure below, the “Freeze in current viewpoint” and “Freeze new viewpoints” are dimmed out and seem to not work. This occurs when the drawing is in Model space; the options are available only in Paper space.
Ÿ Freeze in current viewport
freezes the selected layer in current layout viewport. You can freeze or thaw the layer in the current viewport of a layout without affecting visibility of the layer in other viewports. (Note that you must activate a viewport before freezing the layer: double-click the viewport to get into model mode.) Frozen layers are invisible and unable to regenerate or plot; you restore visibility through thawing the layer. This option is only available on layouts.
Ÿ Freeze in new viewports
freezes selected layers in newly-created viewports of layouts. This option is only available on layouts.

Senin, 25 Juli 2011

Knowledge detail

Entities missing from plots

Q: Why are some entities are missing in my plotted output?
A: If you find some entities missing from the printout, first check the Layer Properties Manager to see whether some layers have plot turned off.

 Note that objects on the DEFPOINTS layer will never be allowed to print, because this layer is by default a non-printing layer,because it is used to store information used by ZWCAD for dimensions.



A known problem is that some portions may go missing when drawings are printed to large paper sizes, such as A0 (metric) and E (imperial).
If this does not solve the problem, then it may be due to a problem with the drawing. Feel free to send the drawing to tech@zwcad.com for further investigation.
Figure: If the layer is not allowed to plot, then the objects on this layer are not be printed.

Minggu, 24 Juli 2011

Knowledge detail

Insufficient memory when printing

Q: Why does the “Memory is not enough” error message appear when I print drawings? How can I fix it?
A: The problem may be due to the configuration of your hardware and software. Usually, printing requires large amounts of memory, especially when printing large, high-quality images. The error message typically appears on PCs with small amounts of memory (RAM). To avoid the problem, close programs that are not necessary. In addition, consider adding more RAM to the computer, or even to the printer, if it takes additional RAM.

Rabu, 20 Juli 2011

Knowledge detail

Printing/plotting occurs slowly

Q: Why is the printing very slow?
A: Generally speaking, the printing/plotting function works well in ZWCAD. But the speed may be affected by factors like using the printer over the network, printing large images, or the configurations of the computer.
An alternative is to plot drawings as PLT files, and then plot them on another computer to a HPGL-compatible devices using Batch Plot function.

Selasa, 12 Juli 2011

Knowledge detail

Rendered images

Q: How do I plot rendered entities as images?
A: Follow these steps to render drawings in plots:
    1. Use the Render command to shade-render the entities in your 3D drawings.
    2. From the View menu, choose Render, and then Preferences.
    3. In the Render Settings dialog box, choose the Rendering tab.
    4. You can save the rendered image as a JPG file by clicking the Save Last Image button.
    5. Finally, you can plot the image.

Minggu, 10 Juli 2011

Knowledge detail

Plots with hidden lines removed

 Q: Does ZWCAD support hidden-line removal plots?
A: ZWCAD supports hidden-line removal in plots. To plot 3D drawings with hidden entities removed, you should turn on the Hidden Plot option in the Plot dialog box. 


Kamis, 07 Juli 2011

Knowledge detail

About raster output

Q: How do I add more types of raster output?
A: ZWCAD supports many kinds of raster output, and you can add them through the Add-A-Plotter wizard. Additional raster formats may be available from the Internet; we have found that most of them work well with ZWCAD.

Senin, 04 Juli 2011

Knowledge detail

Use STB files for printing with ZWCAD

Q: How do I use STB files when printing with ZWCAD?
A: Plot tables come in two flavors. One is the traditional color-based plot table (CTB), the other is the newer style-based plot table (STB). A drawing file can use only one type of plot table, color-based or style-based.  At present, ZWCAD supports CTB files but not STB files.
Plot styles are property that can be assigned to objects and layers in STB-flavored drawing files. When set to ByLayer, objects inherit the plot style property from layers, just as they do with colors, linetypes, and lineweight.
(In AutoCAD, the PStylePolicy system variable specifies the plot style (STB or CTB) to be assigned to new drawings. The PStyleMode system variable reports the current drawing’s plot style: 1 indicates CTB, while 0 indicates STB. The ConvertPStyle command changes the type of plot style.) Since ZWCAD does not support STB, the commands mentioned in the above paragraph are not available for now. If you come across drawings that require STB files, you might be able to use the ConvertCTB command to change STB files to CTB files, and then open them in ZWCAD.

Knowledge detail

Customizing print styles

Q: How do I customize print styles?
A: You can modify Plot Style tables in ZWCAD. In the latest update to the program, you can modify many item of Style Properties as shown below, such as grayscale, linetype, and fill style.
 You can also save the changes by another CTB (color-based plot table) file name stored in your computer.

Selasa, 14 Juni 2011

Knowledge detail

Modifying the CTB file path

Q: How can I modify the path to the CTB files?
A: Follow these steps:
      1. From ZWCAD’s Tools menu, choose Options.
      2. In the Config dialog box, select the Files tab.
      3. Open the Printer Support File Path node, and then you can modify Plot Style Table Search Path. See the figure below.

Minggu, 12 Juni 2011

Knowledge detail

Customizing paper sizes

 QHow do I set customized paper sizes?
A: When you need to print drawings to different sizes of paper, you can find many different paper sizes in the Paper dropdown list of the Plot command’s dialog box, as illustrated below.

You can also customize some additional paper sizes using the following methods.
  • If the plotter was added through a driver in Windows, you can customize the paper sizes as follows:
                      1.   Click the Properties button.
                       2.   Click Customize Properties. Here you can find options, including those for paper sizing. 



If you used the Add-A-Plotter wizard to add a plotter, you can customize the paper size by choosing the Customize Paper Sizes option, and then click the Add button.
 

Rabu, 08 Juni 2011

Knowledge detail

Adding plotters to ZWCAD

Q: How do I add a plotter\printer or raster output?
A: There are two ways to install a plotter’s driver. The first method is to install the regular printer driver directly, which you can find from the Internet or accompanying the printer. This is just like adding a new printer in Windows.
The other method is to use ZWCAD’s utility tool named “Add-A-Plotter Wizard”, with which you can add drivers for printer or raster output.

Selasa, 31 Mei 2011

Knowledge detail

Text show up as “???”

Q: After I worked through the solutions provided above, I find that text in my drawings still show up as “???”. Why is this?
A: Pay close attention to the font path: C:\Program Files\ZWCAD 2009 Eng\Fonts. In some cases, another folder named Font is created in this folder. If so, copy all of the font files from the Font folder to the C:\Program Files\ZWCAD 2009 Eng\Fonts folder.

Senin, 30 Mei 2011

Knowledge detail

How can I add fonts for use by ZWCAD?

Q: How can I add fonts for use by ZWCAD?
A: From the Tools menu in ZWCAD, choose Options, and then select the Files tab. Add the font path to the Fonts File Search Path item. (Please refer to the figure below.)


Minggu, 29 Mei 2011

Knowledge detail

Multi-lingual text in mtext editor

Q: Does ZWCAD’s Mtext editor support multi-lingual text?
A: Yes. Multiple languages like Chinese, English, French, Spanish, Portuguese, Thai, and Japanese can be entered and displayed in the Mtext editor at the same time. (See figure below.) This is convenient when working with international clients. 

Kamis, 26 Mei 2011

Knowledge detail

Enable ZWCAD to recognize special word

Q: Why are some words displayed as “???” in drawings?
A: The font needed to display the text is missing from your computer or cannot be read by ZWCAD. To solve this problem, you need to install the CAD font package in is in the Fonts folder of the ZWCAD folder. Please refer to the following figure. 

Kamis, 19 Mei 2011

Knowledge detail

Tip on Using OLE

Q: I have Microsoft Word document in which I inserted a drawing from AutoCAD. When I double-click the drawing, it should open in ZWCAD , but it does not. What should I do?
A: Go to ZWCAD installation folder. There you will find the utility program ConversionOleID.exe. Double-click it to run; it sets ZWCAD as the default software for opening .dwg OLE objects in Microsoft Word and other applications.

Selasa, 17 Mei 2011

Knowledge detail

Fix the position of attribute text

Q: Am I able to fix the position of attribute text?
A: ZWCAD has the option for locking the position of attribute text. Turn on the Lock Position option in the Define Attribute dialog box.
 

Q: How can I move attributes that are locked into position? There is no grip for moving them.
A: When attributes are locked into position they cannot be moved, and so they lack the grip. The workaround is to use the –AttEdit command. Execute it step by step, and you will see that it has a Position option, which lets you move the attribute to a different position.

Rabu, 11 Mei 2011

Knowledge detail

Differences of editing attributes between ZWCAD and AutoCAD

Q: How are ZWCAD and AutoCAD different in editing attributes?
A: AutoCAD has two commands for editing attributes in blocks, AttEdit and EAttEdit. AttEdit displays the Edit Attributes dialog box for editing attribute values, while EAttEdit displays the Enhanced Attribute Editor dialog box for editing attribute values and properties.
ZWCAD supports the AttEdit command for editing attributes through its Enhanced Attribute Editor dialog box.

Senin, 09 Mei 2011

Knowledge detail

Difference of editing Block between ZW and AutoCAD

Q: When it comes to editing blocks, what are the differences between ZWCAD and AutoCAD?
A: AutoCAD allows the creation and editing of dynamic blocks through the BEdit command. In addition, it has the RefEdit command for in-place of editing blocks and externally-referenced drawings.
ZWCAD does not support dynamic blocks at this time, and so it lacks the BEdit command. ZWCAD does, however, support the RefEdit command for editing blocks and xrefs.
Even through ZWCAD does not support the creation of dynamic block for now, ZWCAD does display and work with dynamic blocks.

Kamis, 05 Mei 2011

Knowledge detail

Q: Each time I add a dimension for diameters, I get only the following results: 
 How can I set the diameter symbol(φ)between the dimension baselines, as shown below?

 A: You can do this by changing a setting in the Dimension Style Manager. Here is how to do it,  step by step:
1) Command: dim      (Press Enter.)
2)  Select the Fit tab, and then turn on the options illustrated below.
3) Click OK to exit the dialog box.

Rabu, 04 Mei 2011

Knowledge detail

Is there any setting by which I can get associative dimension?


Q: Is there any setting by which I can get associative dimension?
A: Associative dimensions are not provided at present, but we have established a schedule for adding this function in the future.

Senin, 02 Mei 2011

Knowledge detail

Why can I not select images?

Q: Why can I not select images?
A: Images can be selected by their frames only, the rectangle that outlines them. If you cannot see the image’s frame, then check the value of system variable ImageFrame. It has three possible values, 0, 1, or 2:
0: Hides image frames (you cannot select the image or its frame).
1: Displays and plots image frames, and allows you to select them.
2: Displays image frames (and allows them to be selected), but does not plot the frames.
The setting of the ImageFrame system variable affects all images in the current drawing.

Selasa, 19 April 2011

Knowledge detail

What is the Explode command useful for?

 Q: What is the Explode command useful for?
A: You can use the Explode command to “explode” complex objects into simpler ones. For example, blocks can be exploded into their original objects, multiline and polyline objects become lines and arcs, and so on. The command also works with 3D objects. For instance, if you need to export to a SAT file some 3D objects that had been combined inbto a block, the block will not be exported. The solution is to explode the block and return it into its original 3D objects. 

Minggu, 03 April 2011

Knowledge detail

What is the best way to modify objects?

Q: What is the best way to modify objects?
A: ZWCAD has many commands for modifying objects, and sometimes we even modify them directly through grips. Perhaps the most useful tool for modifying objects and their properties is with the Properties bar. (You can open the Properties bar with Modify>Properties.) The Properties bar is especially useful when you need to modify a single object with specific values, such as a length or radius. You can directly input these values in the appropriate fields of the Properties bar. In addition, the Properties bar very usefully displAays all known information about the selected object.

Kamis, 31 Maret 2011

Knowledge detail

Create different kinds of points in a drawing


Q: Can I create different kinds of points in a drawing?
A: There is only one kind of point object in ZWCAD, and it is created by the Point command. You can however, change the style of points with the DdPStyle command. Points can look like boxes, circles, tick marks, and combinations thereof. When you change the point style, however, all points change to the current style, so the drawing cannot have points that look different from each other.

Rabu, 30 Maret 2011

Knowledge detail

Difference of drawing circle between using command and menu


Q: What is the difference between using the command prompt and then menu in drawing circles?
A: To draw a circle at the command prompt, you enter the Circle command, and then see its many options, such as 2Point, 3Point, Ttr (tan tan radius), Arc, Multiple, and Center of circle.
In contrast, when you draw a circle from the menu, you begin with selecting Circle from the Draw menu, and then you see a submenu off additional options. The menu has the advantage of offering one option not found on the command line: Tan, Tan, Tan. This option is convenient for drawing circles that must be tangent to points on three other circles and/or lines.

Selasa, 15 Maret 2011

Knowledge detail

Network Version: Unable to Activate ZWCAD on the Server?

On the Server


Q: Why can I not activate ZWCAD on the server?

A: Ensure you followed these steps:
    1.    After getting the successful registering message, click the Start button, as illustrated below. 

     2.    After clicking OK, restart ZWCAD.  
 

Rabu, 02 Maret 2011

Knowledge detail

Stand-alone Version: Error Message: Registration Failed

ZWCAD Stand-alone Version


Q: I input the license code and then clicked Register button, but then I received a message that looks like this:

A:  Enter the correct license code. Ensure that the code’s version number matches the version of ZWCAD you are registering. For example, if the license code is from the 2009 version, then it cannot be used to register ZWCAD 2010. If necessary, you can email us at tech@zwcad.com and provide us with your product ID, license code number, and the version of ZWCAD. We will confirm the correct numbers.

Selasa, 01 Maret 2011

Knowledge detail

Stand-alone Version: Product ID Text Box is Empty

ZWCAD Stand-alone Version


Q: Why is the Product ID text box empty?
A: This may result from any of the following reasons:
   1. The dongle driver needs to be repaired by following these steps:
      a) Go to Start >>All Programs >>ZWCAD 2010 >>Dongle Driver.
      b) Click Next, and then click Next.
      c) Click Complete, and then click Yes to restart the computer
   2. The dongle is broken. Contact tech@zwcad.com to obtain a replacement dongle

Minggu, 27 Februari 2011

Knowledge detail

About ZRX

Q: How is progress coming along for ZRX?
A: ZRX is a new application programming interface(API) that is similar to ARX.As one of the most powerful APIS in ZWCAD, ZRX enables developers to directly access DWG database, customize entities and migrate their ARX applications to ZWCAD quickly.

Minggu, 20 Februari 2011

Knowledge detail

About SDS

Q: What is SDS, and what can I do with it?
A: SDS is an acronym for “Solutions Development System,” a C/C++ language interface compatible with the ADS® (AutoCAD® Development System) interface found in other CAD systems. SDS provides hooks into ZWCAD, allowing you to create custom applications.
SDS communicates with the user and ZWCAD via LISP akin to the way that ADS works with AutoLISP in other CAD systems. However, SDS greatly augments the capabilities of LISP with a more powerful command base that also accesses the operating system. This allows you to create more sophisticated custom solutions. And because SDS applications are compiled, they are run typically many times faster than any LISP application.
Issue: SDS development environment
Q: How do I configure the development environment when work with the SDS API?
A: SDS is strictly a C/C++ SDK, and so it can be used directly by a standard VC (Visual C) object; you do not need to configure the development environment specially for an SDS application. In other words, you can use the Wizard embed in VC++ compiler to generate a VC object automatically for a SDS application.
The SDS application is built as a DLL file, and the entry point of the DLL file is defined as show below:
void __declspec(dllexport) SDS_EntryPoint(HWND hWnd)
{
   AFX_MANAGE_STATE(AfxGetStaticModuleState());        
   SDS_main(1, &ads_argVec);
    return;
}

Rabu, 16 Februari 2011

Knowledge detail

Migrating VBA

Q: Is it possible to migrate my VBA applications from AutoCAD to ZWCAD?
A: Yes, of course! VBA is designed to be portable between applications. But you will need to make some modifications before migrating the code, which can be done with global search and replace. The changes are as follows:

1. Replace “thisdocument” with “thisdrawing”.
2. All the object names with the prefix of “acad” must be changed to “zwcad”. For example, change “acadLine” to “zwcadLine” and change “acadArc” to “zwcadArc”.
3. The head of the enumeration must be changed from “Ac” to “zc”. For example, change the enumeration about HATCH as follows:
• Change “AcHatchStyle” to “zcHatchStyle”
• Change “AcHatchStyleIgnore” to “zcHatchStyleIgnore”
• Change “AcHatchStyleNormal” to “zcHatchStyleNormal”
• Change “AcHatchStyleOuter” to “zcHatchStyleOut”
Note that there are two special enumerations:
• Change “ACAD_COLOR” to “ZcCOLOR”
• Change “ACAD_LWEIGHT” to “ZCLINEWEIGHT”
4.There is no “Objectname” or “Objecttype” property in this version of ZWCAD. Instead, use “Entityname” and “Entitytype”. If the object is an entity, you can replace them; otherwise, use the “name” property.
Note that it is best to use “Entitytype” if the object has this property, because the name of the object may change in future releases.
5. AutoCAD uses arrays to store points, but ZWCAD defines points as objects, as shown in the following sample code:
Dim PointObj as new Zwcadpoint ‘Must use the NEW function
‘The same mode in AutoCAD and ZWCAD
PointObj(0) = 1
PointObj(1) = 1
PointObj(2) = 1
‘Another mode in ZWCAD
PointObj.x=1
PointObj.x=1
PointObj.x=1
If you want to get a point from user, you must use the SET function, because point is an object. Here is a sample piece of code:
Set PointObj = ThisDocument.Utility.GetPoint(, vbCrLf & “Please choose a point: ”)
When you need to deal with many points, AutoCAD uses array, but ZWCAD uses the “zwcadpoints” class, as illustrated by this sample code:
Dim points as new zwcadpoints ‘Must use NEW to built a list
Dim point as new zwcadpoint
Set point = points.add(x, y, z, item)
5. AutoCAD’s 3dvector is defined as an array, but in ZWCAD it is named “zwcadVector”. It is an object in ZWCAD, so you must to create it with the NEW and SET functions. Here is an example:
‘Define points and vector
Dim Spline as zwcadspline
Dim Points as zwcadpoints
Dim pointObj as new zwcadpoint
Dim startVector as new zwcadVector
Dim endVector as new ZwcadVector
‘Set points
Set PointObj = Points.Add(0, 0, 0, 0) 
Set PointObj = Points.Add(1, 5, 0, 1)
Set PointObj = Points.Add(9, 10, 0, 2)
‘Set vector
startVector.x = 0.5
startVector.y = 0.5
startVector.z = 0
endVector.x = 0.5
endVector.y = 0.5
endVector.z = 0
‘Drawing a SPLINE
Set splineObj = ThisDocument.ModelSpace.AddSpline(Points, startVector, endVector)

Senin, 31 Januari 2011

Knowledge detail

VBA Applications

Q: How can I create a VBA application with ZWCAD?
A: VBA (Visual Basic for Applications) has its own interface environment, and so to work with VBA in ZWCAD, open the VBA environment, as follows: From ZWCAD’s Tools menu, choose Macro and then VisualBasic Editor.
This opens Visual Basic program to display VBA environment window, known as IDE, which is short for “integrated development environment.”
A VBA project is a collection of code modules, classes and forms. A module is a program code segment, like a subroutine in traditional programming languages. A project contains one or more modules. Forms are user interface elements, such as dialog boxes and toolbar. Modules and forms run together to perform given functions.
You add a new modules by selecting Module from the Insert menu in the Visual Basic project window. This opens the module file editor window, in which you can write VBA programming code. The action also adds a new module icon (with the default name of Module1) to the module list in the Project window. 
 Note that ZWCAD continues to run while the VBA environment is open. This allows you to toggle between the VBA IDE and ZWCAD.
The following VBA program draws a donut with an inside diameter of 10 and outside diameter of 15:
 Sub DrawDonut()
       
    Dim CenterPt As New ZwcadPoint
    Dim OutRad As Double
    Dim InRad As Double
   
    CenterPt.x = 10: CenterPt.y = 10: CenterPt.z = 0
   
    OutRad = 15
    InRad = 10
   
    Dim pt1 As New ZwcadPoint
    Dim pt2 As New ZwcadPoint
    Dim pts As New ZwcadPoints
   
    pt1(0) = CenterPt(0) - InRad - Abs(OutRad - InRad) / 2
    pt1(1) = CenterPt(1)
    pt1(2) = 0
    pts.Add pt1(0), pt1(1), pt1(2), 0
   
    pt2(0) = CenterPt(0) + InRad + Abs(OutRad - InRad) / 2
    pt2(1) = CenterPt(1)
    pt2(2) = 0
    pts.Add pt2(0), pt2(1), pt2(2), 1
   
    Dim PolyObj As ZwcadLWPolyline
    Set PolyObj = ThisDocument.ModelSpace.AddLightWeightPolyline(pts)
    PolyObj.Closed = True
   
    For i = 0 To 1
        PolyObj.SetBulge i, 1
        PolyObj.SetWidth i, Abs(OutRad - InRad), Abs(OutRad - InRad)
    Next i
       
    PolyObj.Update
   
    ThisDocument.Regen
   
End Sub

Kamis, 27 Januari 2011

Knowledge detail

Migrating LISP Applications

Q: Can I migrate my LISP applications to from AutoCAD to ZWCAD?
A: You can run existing LISP applications in ZWCAD with little or no modification. ZWCAD uses the AppLoad command to easily load LISP programs.
You should, however, be aware of some differences between the LISP programming language used by AutoCAD and ZWCXAD. For instance, AutoCAD offers a total of 422 LISP functions, of which 242 for AutoLISP and 180 for Visual LISP. In comparison, ZWCAD offers a total of 301 LISP functions, of which 206 are equivalent to those in AutoLISP and 95 equivalent to Visual LISP.
While ZWCAD is highly compatible with AutoCAD’s LISP, some functions are not supported at all. Specifically, those in AutoCAD beginning with VL,VLAX, and VLR are not supported as well by ZWCAD. We are, however, making great progress on them.

Senin, 24 Januari 2011

Knowledge detail

LISP programming

Q: How so I create LISP applications?
A: The steps to write applications in LISP are as follows:
1. Open a text editor such as NotePad.
2. Write the LISP code in the text editor’s window.
3. Save the code in a file using the desired path and file name. Ensure the extension is SP.
4. Load and run LISP program in ZWCAD with the AppLoad command.
The following LISP program is an example. It creates a layer named “Test,” changes the layer’s color to green, and then draws a closed polyline on the layer.(defun C:testlisp (/)
  (setvar "cmdecho" 0)
  (command "-layer" "t" "test" "m" "test" "c" "green" "test" "l" "continuous"
   "test" "lw" "0.5" "test" "")
  (command "pline" "-2,-3,0" "6, 4, 0" "1, -10, 0" "-11, -9, 0" "-12, -1, 0" "-6, 2, 0" "-1, 7, 0" "c")
  (command "regen")
  (command "zoom" "e" "")
  (setvar "cmdecho" 1)
  (princ)
)

Knowledge detail

Customizing the toolbar and menu

Q: I want to add some toolbars and menu items to my copy of ZWCAD. How do I do that?
A: Solution: For this purpose, you are supposed to know something about menu script. You could use MENULOAD to load local menu file to existing basic menu files. Note that both the basic menu file and any local menu files are associated with a menu group name. After loading a local menu, you can customize the ZWCAD menu bar by adding and deleting pull-down menus and other elements.
  “Local menu” refers any menu files in addition to the basic menu file. Any documents can be used as basic menu or local menu, but for the convenient operating, proposed to use larger menu as basic menu file, and then load other smaller local menu files in the process of implementing the procedures. After loading menu group files, they can be uninstalled by groups; when there is only one group left, ZWCAD reverts to its default configuration. Users can make use of Regidit command’s Import function. For example, here folders are added to the path of ZWCAD2009 Eng:
  HKEY_CURRENT_USER\Software\Chinaweal Longteng\ZWCAD 2009 eng\Profiles\Default\Menu The default menu group is named with “Group 0”, and the first implemented menu group is named with “Group 1”, and so on. Make there is no conflict between your menu group name and former ones. Three kinds of menu files -- .mnu, .mns, and .icm -- can be imported through both the Customize and MenLoad commands. (MNU and MNS files are compatible with AutoCAD, while ICM files work with IntelliCAD and compatibiles.) When importing files, you should use editor to change the group name of the menu file to ZWCAD to distinguish it with the default group name. The XML toolbar file exported from ZWCAD program command can be imported thorugh the Customize command. (It cannot be imported through the MenuLoad command.) After loading a new menu file, right clicking the tool bar displays a shortcut menu that lists the names of currently-loaded toolbars and menus. If you wish to edit toolbar icons, you can do so in a development platform, such as Microsoft’s Visual Studio 6.0. Compile it to a *.dll file, and then rename the *.dll file with the name of the menu file. When loading the menu file, ZWCAD searches for the corresponding *.dll file in which the toolbar icons are located. Note that all of these files must be located in the installation directory of ZWCAD.