Welcome to Issue 88/2001 – 11-July-2001 of the VietCAD Bulletin

27 137 0
Welcome to Issue 88/2001 – 11-July-2001 of the VietCAD Bulletin

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

no 88-2001.doc of 27 Welcome to Issue 88/2001 – 11-July-2001 of the VietCAD Bulletin Your CAD/CAM update from VietCAD Please forward this message to someone you know interested in CAD and automated engineering ***************************************************************************** TABLE OF CONTENTS Autodesk news – New Products a AutoCAD R14 is Going Away: Are You Ready? b AEC NEWS c Autodesk products will be compatible with Windows XP d Architectural Desktop R3 AutoCAD Technical Information: a AutoCAD 2002 technology briefings b Architectural Desktop - The third way? c AutoCAD 2002 - What's New? d Autodesk Inventor Utility AutoCAD Tips & Ticks: a Closing the Render window in AutoCAD (14/2000) b Quickly close polylines and line segments in AutoCAD (14/2000) c Quickly rename named objects in AutoCAD (14/2000) d Rotate dimension text independent of the dimension in AutoCAD (14/2000) e Use the COPYLINK command to insert a drawing as an OLE object in AutoCAD (14/2000) f Using AutoCAD 2000's Fit Options feature to adjust dimension text and arrows g What's the difference between the Pasteblock and Pasteorig commands in AutoCAD LT 2000? AutoLISP – Visual LISP – VBA Tips & Ticks a Drawing 2-D structural W-beams using AutoLISP and DCL Internet sources SUBSCRIBING/UNSUBSCRIBE AND SENDING COMMENTS ***************************************************************************** no 88-2001.doc of 27 AUTODESK NEWS – NEW PRODUCTS -1a) AUTOCAD R14 IS GOING AWAY: ARE YOU READY? Autodesk is now shipping AutoCAD 2002 and will soon be discontinuing support for AutoCAD Release 14 In January 2002 just months from now Autodesk will no longer sell upgrades from R14 to newer releases of AutoCAD (such as AutoCAD 2000i and AutoCAD 2002) New seat sales, upgrades, and support of R14 will be phased out to give customers time to plan, as well as take full advantage of special offers and pricing incentives to purchase the latest releases Autodesk and channel partners around the world are notifying customers of this news Why did Autodesk make this decision? R14 is now over years old Our software has undergone major upgrades and a number of updates that were designed to match the evolving business challenges of Autodesk's customers While R14 has been well received, the technical foundation for AutoCAD, for operating systems, and for compatible products has changed significantly since its release and it's time to move on As a valued partner, you can help us explain the choices and opportunities customers have available to them so they can make the best decision for their business need from remaining on R14 to moving to an AutoCAD 2002-based solution, or possibly moving to a vertical product This is also an occasion for your customers to upgrade their versions of your software If you're an author, it's a chance for you to provide tips and guidance on the latest version If you're a consultant, now's the time to encourage your customers to take advantage of the new services you offer related to AutoCAD 2002 Over the next few months, many partners are offering upgrade incentives How about you? Here's a quick checklist to think about: Are your products compatible with AutoCAD 2002? Do you have a plan to promote the products that you've based on AutoCAD 2002, or the products you've developed to extend our vertical products? Are you offering incentives to your existing customers? Have you considered a special offer to upgrade from your R14-based product/publication/service to an AutoCAD 2002 version? This is a great opportunity to help your client base move to the most up-to-date design technology, improve customer service and boost sales Keep in mind: The cost of supporting Release 14 and Release 14-based vertical products is huge We believe it is best for our entire virtual corporation and for our customers to focus our people and our energy in support of current Autodesk products and development of future state-of-the-art technologies Call VietCAD for more details -1b) AEC NEWS I have been spending time this summer in Virginia working for an architectural firm in Norfolk They are looking to upgrade to ADT 3.3 and having some major pains They heavily rely on the Softdesk components - the AEC menu and Details Autodesk has eliminated many of the Softdesk tools Some no 88-2001.doc of 27 have been replaced, but if you have a favorite tool, you may be out of luck Details are still available in ADT3.3 as a separate installation It runs in SDI mode only and Autodesk does not recommend you use it I was told that Autodesk would not support any Softdesk component past ADTR1 or AutoCAD R14 The tools will come back as users scream for them In the meantime, look for a drop in productivity for those users who rely heavily on the Softdesk components On the upside, developers have a real opportunity here to come in and fill the need by providing customized routines to help users over the void * AUTODESK'S BUILDING SYSTEMS PRODUCTS Running on top of Autodesk Architectural Desktop 3.3, Autodesk Building Mechanical and Autodesk Building Electrical provide a model-based approach to design development and construction documentation Features such as the ability to automatically generate 3D isometric representations of designs result in more accurate and more coordinated sets of building data Object behavior adds intelligence to building components, and dynamic documentation features help complete the design process For more information, visit http://www.autodesk.com 1c) AUTODESK PRODUCTS WILL BE COMPATIBLE WITH WINDOWS XP ``The launch of Windows XP is the most significant PC industry event in the last 10 years Autodesk believes that Windows XP is the platform that provides the new computing experiences our customers have been asking for We are really excited about the Designed for Windows Logo Program because it provides our customers with the assurance that Autodesk products were built to take advantage of the next generation of Microsoft technologies.'' 1d) ARCHITECTURAL DESKTOP R3 Autodesk® Architectural Desktop 3—finally a software solution so intuitive, so easy to use, you’re free to focus on what you best—great design Fully 2D and 3D capable, Internet-integrated, and packed with intelligent objects, Autodesk Architectural Desktop is the building design resource that brings your ideas to life no 88-2001.doc of 27 Intuitive Software for Freedom of Design Whether you design in 2D, 3D, or both, Autodesk Architectural Desktop gives you a natural, intuitive way to quickly bring your ideas to life with intelligent building objects Curtain walls, stairs, structural members, and many other intelligent building objects behave according to real-world properties, so they automatically reflect design modifications For example, when walls intersect, they clean up on their own Change a wall’s width, and its doorframes and windows automatically update as well Plus you can dynamically link objects to schedules for up-to-the-minute accuracy in all project phases So let the software the work while you explore different design scenarios Greater Profitability Through Higher Productivity With its use of intelligent object technology, Autodesk Architectural Desktop shortens the design cycle time, which directly translates into dollar savings Especially during construction documentation and administration, the last thing you want is to spend valuable time making endless drawing revisions, plotting loads of paper drawings, and overnight them with an expensive courier service Because drawings created in Autodesk Architectural Desktop are dynamically linked, your building model updates throughout all files for fully coordinated, accurate construction documents And when your drawings are finished, conveniently transmit them over the Web and save all those overnight courier costs Sharing Information: Compatibility and Connectivity Sharing design information with the entire project team has never been easier Because Autodesk Architectural Desktop is built on AutoCAD® 2000i, you get the full benefits of the most widely used professional CAD product in the world, including perfect compatibility with the DWG file format And Autodesk Architectural Desktop has all the Internet capabilities of AutoCAD 2000i—Meet Now, eTransmit, Publish to Web, and more So you can post drawings to the Web, connect to design resources, drag architectural content directly into your drawings, and conduct online meetings—all in real time for the decisive competitive advantage in today’s fast-paced world The Vision of Design As building owners demand more and more true-to-life visualization of architectural ideas early in the design process, it is crucial that information be shared across design applications With Autodesk Architectural Desktop you can seamlessly integrate your drawings with other Autodesk industry solutions, such as 3D Studio VIZ®, Lightscape®, and Character Studio® For example, you can integrate a model created in Autodesk Architectural Desktop with 3D Studio VIZ or Character Studio for photorealistic 3D rendering and animation—a fast way to win, visualize, and market a project System Requirements For optimal use of Autodesk® Architectural Desktop, the following hardware is recommended Pentium® 233–based PC Microsoft® Windows® 95, Windows 98, Windows NT® 4.0, or Windows 2000 128MB RAM 1024x768x64K graphics card and color monitor CD-ROM drive no 88-2001.doc of 27 Pointing device AUTOCAD TECHNICAL INFORMATION 2a) AUTOCAD 2002 TECHNOLOGY BRIEFINGS Avatech Solutions is hosting a series of free technology briefings across the U.S to launch AutoCAD 2002 Avatech will host the one-day briefings in sixteen cities nationwide Avatech has assembled three "dream teams" of the company's top civil, architectural, and mechanical applications engineers to perform live demonstrations, conduct workshops, and answer questions AutoCAD 2002 features collaboration tools and streamlined standards management that will be explored during the briefings For dates and locations, go to http://www.avatechsolutions.com 2b) ARCHITECTURAL DESKTOP - THE THIRD WAY? Autodesk’s Architectural Desktop (ADT) has managed to sell over 100,000 copies worldwide With this kind of installed base, ADT is probably the most popular AEC specific tool on the market today However, previous versions have been difficult to learn and lacking in features to complete on the Virtual Building Model Joe Croser reports on the latest release – ADT3 Eighteen months ago I reviewed Architectural Desktop (ADT2) and I didn’t like it I pointed out the inconsistencies in Autodesk’s approach to CAD modeling, how its family of modeling applications could not share geometry and in particular its method of addressing inter-operability - the way the geometry created in one application is transferred to another for reuse All proprietary-modeling applications suffer from data loss or more specifically loss of information from data during translation However, data produced in ADT2 could not even be viewed in native AutoCAD applications of the same version without a specific object enabler (an extra mini-application, which is able to read the data from ADT2 and display it in a format which AutoCAD, will understand) Furthermore the much loved and well-supported LT could not read the data at all as it did not have support for object enablers Thankfully with the 2000i suite of products much has changed LT now supports object enablers and with release of Architectural Desktop (designed specifically to work with 2000i) many new functions have been incorporated In an attempt to make ADT3 a more comprehensive building modeling solution new functions have been added and include Curtain Walls, Window Assemblies, Structural Members, Slabs and Floor Openings, Ducts, Area Calculations, Display Management tools and Live Sections I know that Autodesk felt hard-done-by with my review of ADT2, and as it can be very difficult to get a grip on a new product and explore its functionality in depth, I decided to play this one slightly differently Instead of getting my paws on a copy of the software, sitting down with the manual and treading gingerly through the online tutorial I decided to delegate thus leaving both eyes free to watch and both hands free to record my observations on my trusty Palm Vx no 88-2001.doc of 27 I arrived in Guilford at the UK Headquarters of Autodesk to give ADT3 a good going over, well a good looking at anyway My strategy was simple; instead of testing the software I wanted to observe it being applied to solving a problem by people who already knew the software inside out Like a mixture of the Crystal Maze, Challenge Anika and Busman’s Holiday I arrived armed with plans and sections of a building, which I wanted to see, constructed in ADT3 In return, Autodesk assembled a team and placed them at my disposal for one day to demonstrate ADT3’s all round modeling ability and section cutting prowess I got the impression that I was being viewed with caution and was left in no doubt that if I tried to pull a fast one the wooden horse trick would be cut off at the gates (as if I would resort to that old chestnut) When I produced the drawings of Le Corbusier’s Villa Savoye the mood in the room visibly lightened, I was not, they decided, out to trip them up I like using the Villa for modeling as it balances solid with void and contrasts simple geometric forms with the asymmetric curves of the screen walls on the roof It is also easy to subdivide the whole into separate component parts across more than one file and unlike Rome can easily be built in a day In short it is the perfect subject for this simple test Like all new projects we were to start with a blank canvas ADT3 shares the 2000i interface and can start up with the ‘classic’ AutoCAD interface or with the newer-look web-friendly ‘AutoCAD Today’ page that has been designed to look like a web page I must say that I like the latter but it does not sit comfortably on my meager 800x600-resolution laptop so I am forced down the route of the traditional classic interface in order to see all of the available options First we created a new Grid file (in the interests of good practice and collaborative working we decided to split the model down into logical partitions) and used the grid tools; which had a simple layout and were easy to use, to place the grid In a flash it was complete and we were ready to move on We saved the file and created a second file for the ground floor columns Using the omnipotent X-ref tools we attached the grid file and populated the new file with structural columns The library for selecting the columns was comprehensive and XML-based (written with text) making it easy to transport across slow Internet connections for data sharing Whenever columns are placed they can also be ‘associated’ to the grid so that if the grid spacing should change the columns change too Unfortunately for us both the grid and the columns have to reside in the same file and as we were using many different files referenced together the associations did not work This is a shame as anyone who has used and understands X-refs knows of their value and uses them wherever possible We saved the columns and created another model file for the first floor walls, referencing the grid and columns files The walls went in easily but had to be moved into the correct vertical location, which seemed odd for a tool designed for ‘real-world’ models The floor and roof slabs were placed and again had to be moved vertically into place Surely with such an application it is possible to set a ‘virtual’ base for each piece of geometry however, this was not demonstrated I was beginning to think that even for ones that know the application well it is not logical or intuitive to use Creating windows of varying sizes was a synch Using ‘Window Styles’ for different display representations (Display Reps) it was easy to create the first and then duplicate and modify it to create all other iterations This had to be the best bit yet We checked the file size and it weighed in at 428K At first it seemed a little on the lardy side so we checked the size of the template which registered a considerable 385K This meant that the entire model we had created thus far contributed just over 40K to the size of the file Now that IS efficient! In a world of collaborative working practices where data is shared across both intellectual and geographical borders ADT3 gets a huge thumbs up for it approach to layer management At any time the layer names being used can be ‘exchanged’ for others without affecting the integrity of the data In this no 88-2001.doc of 27 way your own internal layer standard can be changed to look like any other standard at any time with just a few button clicks Well-done Autodesk Placing ramps and stairs proved to be quite an ordeal At first we tried to place ramps as stairs with a zero riser height, but it didn’t work Then we tried to place it as a slab and rotate it into place Again we had problems with the pivot points of the slab for rotating At one stage we were about to revert to using ACIS solids for the geometry but chose not to, as the solid would not allow for Boolean operations (cut back to or extend forward to meet another piece of geometry) All of this trying and failing involved enough keyboard strokes and right click pop-up menus on the mouse to bamboozle most concert pianists Eventually the problem was solved and we moved on to the curved walls at the top of the building Again this was trouble free and impressed me but left me wondering how they could get some commands so right whilst seemingly forgetting about others entirely Time, like the tide, was waiting for no man so we cut short the modeling process and proceeded to extracting plans and sections from the model Over the past 3-6 months I have looked at a number of applications of this genre; Model-centric applications from which all construction documentation is extracted and I can honestly say that when it comes to cutting sections from the model ADT3 comes a poor last I would not expect it to match the sheer ability of Revit, which makes the section cutting and manipulation look easy AllPlan from Nemetschek and TriForma from Bentley are also easier to use and deliver more capable section cutting tools than ADT3 I really wanted to like this version of ADT following my disappointment with the previous one Whilst some of my earlier concerns have now been addressed it appears that the competition has managed to better address the fundamental issues of the single building model That said, ADT3 has much strength, I know of people who use Release and achieve great results Adopting the third way (3D that is) is a hard enough conundrum to get your head around without having to learn complex new tools To successfully make the leap from 2D to 3D simple intuitive tools are required and whilst ADT3 has an abundance of technical ability it is unfortunately not intuitive 2c) AUTOCAD 2002 - WHAT'S NEW? The introduction of AutoCAD 2002 marks a new marketing and distribution model for the company Upgrades will now be annual; in order to better manage upgrade paths, and you can buy an annual subscription for upgrading In terms of the software, it looks like AutoCAD 2002 takes some common tasks and makes them easier with features such as true associative dimensioning, the capability to manipulate drawing geometry with a corresponding and immediate change in the dimension or annotation There are also new layer, text, and attribute tools An updated DWF format allows for printing directly from within the software's Volo View and Volo View Express viewing programs, and the Publish to Web feature is expanded in this release to allow for full customization of output as well as the addition of new templates and themes For CAD managers overseeing standards, AutoCAD 2002's new CAD Standards toolset lets you check and encourage standards compliance, resulting in better coordinated teams, a more efficient and effective design process, and a higher return on investment in design tools As a part of the expansion of AutoCAD into data sharing and consumption, they built i-drop technology directly into the product With idrop, you can bring intelligent design content directly from a manufacturer’s website into your drawing file In addition to an object’s geometry, i-drop allows the content provider to attach important and useful no 88-2001.doc of 27 information like spec sheets or material costs and drop it into your design This data can then be extracted using the tools in AutoCAD 2002 to create a bill of materials, for example If you use AutoCAD Release 14, here is what's new Some of the features are, of course, also new to AutoCAD 2000 and AutoCAD 2000i The third release since AutoCAD Release 14, AutoCAD 2002 should improve overall productivity through features like Multiple Design Environment, simplified Array functionality, collaboration tools, standards management, associative dimensioning, plotting enhancements, more powerful 3D, and an estimated 24 percent better application performance Some of the tools available on AutoCAD 2002: Product training at Authorized Autodesk Training Centers Tutorials available on the Autodesk store Recommended books on Autodesk Point A e-Learning Resources on Point A AutoCAD Learning Assistance (ALA) is a tutorial-based, multimedia-learning tool available in the AutoCAD box Multiple Design Environment: Open several drawings in a single session and copy, move, and paint objects from one file to another With Associative Dimensioning, you can modify an object, and its location, orientation, and measurement values are automatically updated No more time-consuming manual updates Visually create and position objects with enhanced AutoSnap and AutoTrack features The Array dialog box takes the guesswork out of creating arrays by letting you preview and modify array options 3D Orbit: Create, view, check, and edit 3D models as you go, from any angle, in perspective and parallel views Edit multiple polylines with a single command and join multiple objects as a polyline even if their ends not meet or they consist of lines and polylines Extend and Trim combined: When you hold down the shift key, the trim command can extend or the extend command can trim Layer States enable you to save a snapshot of the current layer settings in the Layer Manager Layer states can be restored, exported, and imported, making it easy to change the properties of layers for plotting or editing Drag-and-drop hatch: Find hatch patterns in the acad.pat file and drag them onto hatch areas in the current drawing using the DesignCenter feature Use the Block Attribute Manager to manage, extract, and modify attributes without having to explode or redefine the block The Edit Attribute dialog box makes it easier to edit the properties, text, and general appearance of each attribute The Enhanced Attribute Editor is a faster and more accurate way of managing individually selected block attributes Enhanced Attribute Extract allows the easy extraction of block attribute data to commaseparated text (CSV), Microsoft Excel (XLS), and Microsoft Access (MDB) formats Layer Translator converts drawings from one layer standard or convention to another using an existing drawing, standards file, or drawing template Translation information can be saved and reused to allow quicker conversion of future drawings Layer Previous improves UNDO, ZOOM, and Layer operations It operates much like the Zoom Previous command, and restores the previously used layer state without undoing geometry edits or zoom operations no 88-2001.doc of 27 Text Scaling improves the readability of your plot output and reduces the number of manual adjustments necessary Streamlined Output Insert multiple paper-space layouts into a single drawing composed on a virtual sheet of paper Assign lineweights to ensure your drawings plot exactly as displayed ePlot: e-mail or publish your drawings online as plotter-ready, accurate DWF (Drawing Web Format) files Complete with plotting attributes and hyperlinks Strong 3D performance The Heidi 3D Graphics Pipeline provides a rich 3D environment in which to create and interact with your designs 3D Orbit enables you to perform fast, real-time rotation and zooming of rendered and wireframe models You can also dynamically create, view, check, or edit 3D models from any angle in a perspective or parallel view Powerful Communication and Collaboration Tools eTransmit saves time and money by securely sending complete DWG files now including the DWS standards file to anyone via e-mail The delivery is fast and virtually cost-free Use Autodesk i-drop technology to quickly add to your designs by dragging objects from the Web or your intranet and dropping them into your drawings Meet Now uses Microsoft NetMeeting technology to provide a way to collaborate with colleagues and partners in real time over the Internet or your intranet Publish to Web makes it easy to publish drawing for review on the Web or your intranet Host critical data and drawing files using the bulletin Board at AutoCAD Today, accessible from inside AutoCAD Manage standards easily and accurately The Standards Manager associates standards with your AutoCAD drawing and makes it easy to search for and correct standards violations Like a spell checker in a word processor, the Standards Interactive Audit checks the active drawing against the associated standards, reports on any discrepancies, and suggests appropriate resolutions The Batch Standards Checker performs batch audits on multiple drawings and generates an XML-based, browser-viewable report of standards violations Summary Report Information includes a listing of all standards violations found for each drawing Some of the powerful tools you get by upgrading to AutoCAD 2002 have more items on your taskbar than you'd like, you can use the ARX command to close the Render window To this, simply type arx on the command line At the next prompt (Enter An Option prompt in AutoCAD 2000), type u for Unload When AutoCAD asks for the ARX filename, type render (acrender in AutoCAD 2000) When you press [Enter], the Render window closes If at some point you'd like to open it again, repeat these steps but type l for the Load option at the second prompt (Enter An Option prompt in AutoCAD 2000) This tip was contributed by Halil Erhan -3b) QUICKLY CLOSE POLYLINES AND LINE SEGMENTS IN AUTOCAD (14/2000) Normally, to close a polyline or multiple line segments, you have to drag the last line to the end point To help find the end point, you probably first turn on OSNAP However, there's another way to this that involves fewer steps When you're ready to close the polyline, simply type c on the command line Then when you press [Enter], AutoCAD automatically finds the end point and draws the last line to close the polyline S Joe Martin of Chevron Phillips contributed this tip -3c) QUICKLY RENAME NAMED OBJECTS IN AUTOCAD (14/2000) You can use the Rename feature to quickly rename named objects, such as blocks, dimension styles, layers, linetypes, text styles, UCSs, viewports and views, without having to invoke their respective dialog boxes To so, choose Format | Rename or enter rename on the command line to display the Rename dialog box Select the object you want to rename from the Named Objects list box When you do, all the objects of that type are listed in the Items list box Select the item you want to rename and enter the new name in the text box below the old name Now simply click the Rename To button to update the item's name -3d) ROTATE DIMENSION TEXT INDEPENDENT OF THE DIMENSION IN AUTOCAD (14/2000) Usually dimension text is parallel to the dimension line However, there may be times when you want to rotate the text independent of the dimension line To this, choose Dimension | Align Text | Angle Next, select the dimension you want to change and then enter an angle value When you press [Enter] the dimension text changes to the chosen angle (This technique doesn't work with leaders) -3e) no 88-2001.doc 13 of 27 USE THE COPYLINK COMMAND TO INSERT A DRAWING AS AN OLE OBJECT IN AUTOCAD (14/2000) A quick way to insert one drawing into another drawing as an OLE object is to use the COPYLINK command To this, open the drawing you want to insert into another drawing Then enter copylink on the command line to copy the drawing to the Clipboard Open the drawing you want to insert the original drawing into and enter pasteclip on the command line The drawing is inserted as an OLE object into the new drawing -3f) USING AUTOCAD 2000'S FIT OPTIONS FEATURE TO ADJUST DIMENSION TEXT AND ARROWS You can set up AutoCAD to automatically treat certain situations you may run across while creating dimensions For instance, if some of your dimensions include a large amount of text so that both the arrows and the text may not fit inside the dimension lines, you can set up AutoCAD ahead of time to handle this situation To so, before creating your dimensions, choose Dimension | Style or enter dimstyle on the command line to open the Dimension Style Manager dialog box Next, click the Modify button to display the Modify Dimension Style dialog box and then click on the Fit tab The Fit Options area provides six ways you can have AutoCAD deal with not enough room in between extension lines, such as moving either the text or the arrows to the outside of the extension lines, moving the arrows only, moving the text only, moving both the text and arrows, or suppressing the arrows within the extension lines After making your selection, click OK and then Close to dismiss the dialog boxes -3g) WHAT'S THE DIFFERENCE BETWEEN THE PASTEBLOCK AND PASTEORIG COMMANDS IN AUTOCAD LT 2000? When you use the Pasteblock command, you are prompted to select the placement point of the block when you paste it into a new drawing Pasteorig uses the insertion point from the source drawing the original coordinates of the copied object(s) In AutoCAD, use the XLOADCTL variable to control access to xref files by other users When XLOADCTL is set to 0, the entire drawing is loaded, and other users can't modify xref files When XLOADCTL is set to 2, AutoCAD opens a copy of the xref, and other users can modify the original The copy is stored in the temporary files directory or in a directory you specify Demand loading, which can speed up AutoCAD performance, is also controlled by this variable When demand loading is enabled, AutoCAD loads only the xref data needed to regenerate the current drawing It works best when you save your xref drawings with layer indexes for frozen layers and spatial indexes for clipped xrefs The default XLOADCTL setting, 1, keeps the reference files open but also enables demand loading Note that demand loading debuted in Release 14 AUTOLISP – VISUAL LISP – VBA TIPS & TICKS 4a) DRAWING 2-D STRUCTURAL W-BEAMS USING AUTOLISP AND DCL By Greg MacGeorge Application: Autodesk AutoCAD 14/2000 no 88-2001.doc 14 of 27 Download Instead of taking the time to draw individual two-dimensional structural W-beam shapes in the elevation, end and plan views, you can use the DDWBEAM AutoLISP program to create the beams for you The DDWBEAM program uses a Dialog Control Language (DCL) interface to get user input for the size and the view of the W-beam and allows the user to select which layer the beam will be drawn on In this article, we'll show you how to use a programmable dialog box, written in DCL, to get the user input necessary for the DDWBEAM program to draw the 2-D W-beam We'll also show you how the DCL interfaces with the user to get the necessary input for the AutoLISP portion of the program to perform the solution Finally, we'll show you how the 2-D structural W-beam is drawn in the elevation, end or plan view, as shown in Figure A Figure A: The DDWBEAM program allows the user to create an elevation, end or plan view of a 2-D structural W-beam Determining the program problem As with any programming language, it's best to start an AutoLISP programming project by first determining the program problems You then outline what's needed to obtain the solution The main program problem with DDWBEAM is to draw the W-beam according to the size, view and layer that the user selects There's necessary information needed from the user to perform the task of drawing the W-beam in the different views The elevation view of the W-beam consists of a rectangle with two horizontal lines designating the thickness of the flange To create this, the AutoCAD LINE command requires two points: the Starting point and the Ending point The program solution is to prompt the user for the Starting and Ending points and programmatically determine the other points needed to draw the elevation view no 88-2001.doc 15 of 27 The end view of the structural W-beam is also drawn using the AutoCAD LINE command; however, there are 12 points required to draw this view The program solution is to prompt the user for the Starting point of the W-beam and programmatically determine the other points needed to draw the end view Drawing the plan view of the W-beam is similar to drawing the end view in that the plan view is a rectangular object with two hidden lines representing the web thickness of the W-beam The program solution is to prompt the user for the Starting and Ending points and programmatically determine the other points The next program problem is to figure out what command inputs the user will determine and what inputs the program will determine For the DDWBEAM program, the user will pick the Starting and Ending points for the elevation and plan views and the Starting point for the end view The user will also select the size of the W-beam, the layer on which the W-beam will be drawn, and the view of the Wbeam There are several methods available to achieve the user input; however, the DDWBEAM program uses a programmable dialog box, defined using DCL, as shown in Figure B With this method, the order of selection and input by the user isn't important Refer to Listing A for the DCL code that defines the DDWBEAM dialog box Figure B: This is the main dialog box used with the DDWBEAM program Listing A: DCL code that defines the main DDWBEAM dialog box // // DDWBEAM.DCL 1.0 // // DDWBEAM.DCL - Used to get input for the // DDWBEAM.LSP program no 88-2001.doc 16 of 27 dcl_settings : default_dcl_settings { audit_level = 0; } wbeam : dialog { label = "DDWBEAM 1.0"; :image { key = "image"; width = 15; aspect_ratio = 0.75; } : boxed_row { label = "Beam Size:"; :popup_list { key = "te_list"; width = 15; } } : boxed_row { label = "Layer:"; :popup_list { key = "la_list"; width = 15; } } : boxed_column { label = "View"; :radio_button { key = "wend"; label = "End"; } :radio_button { key = "welev"; label = "Elev"; } :radio_button { key = "wplan"; label = "Plan"; } } : boxed_row { label = "Error Msgs"; : text { key = "message"; } } :row {ok_button; cancel_button;} } no 88-2001.doc 17 of 27 // // Loading the DDWBEAM program There are three methods for loading the DDWBEAM program into AutoCAD memory The AutoLISP (load) function is executed from the AutoCAD command line by typing (load "DDWBEAM") Another method of loading the DDWBEAM program is to add the following code to the Acad.lsp file (defun S::STARTUP() (load "DDWBEAM") ) The Acad.lsp file is loaded and the contents automatically executed each time a user opens a drawing in AutoCAD Any commands and AutoLISP functions listed in the S:STARTUP function are automatically executed when the user opens the drawing The code (load "DDWBEAM") loads the DDWBEAM program into AutoCAD memory This method is the same as typing the code on the command line; however, it's executed automatically This method is good for loading many AutoLISP programs at one time without typing the AutoLISP (load) function The AutoCAD APPLOAD command allows the user to select and save a list of programs that can be loaded whenever he opens a drawing in AutoCAD Add the DDWBEAM.lsp file to the APPLOAD list and click the Load button in the Load/Unload Applications dialog box The DDWBEAM.lsp file is then loaded into AutoCAD memory and is available for execution, as shown in Figure C Figure C: You can use the Load/Unload Applications dialog box to load the DDWBEAM program no 88-2001.doc 18 of 27 Once the program is loaded into AutoCAD memory, type DDWBEAM on the command line to execute the program The program executes the main function named C:DDWBEAM The primary task of the program's main function is to load the dialog control language definition of the dialog box (DDWBEAM.dcl) and execute several functions to load the drawing layer definitions and the list of Wbeam sizes See Listing B for a listing of the DDWBEAM AutoLISP code Listing B: The main AutoLISP code for DDWBEAM (see below) How the program works The (set_tbl_list) function is executed during the initial program execution This function is responsible for reading the drawing layers and populating the Layer dropdown list The (set_beam_list) and (set_beam) functions are responsible for loading the list of W-beam sizes into the Beam Size dropdown list and setting the constants for the size of the W-beam The following section of code in the main program function defines an image to be placed in the DCL image control: (setq x (dimx_tile "image") y (dimy_tile "image")) (start_image "image") (start_image "image") (fill_image 0 x y 0) no 88-2001.doc 19 of 27 (slide_image 0 x y "wbeam1") (end_image) Action_tile is an AutoLISP function that accepts the input from the user and performs a task The DDWBEAM dialog control uses four action_tile statements for the user input of the beam size, layer and view of the W-beam The statement (action_tile "te_list" "(setq t_list (atoi $value)) (set_beam)") sets the variable t_list to the value selected by the user from the Beam Size dropdown list and executes the (set_beam) program function The statement (action_tile "la_list" "(setq lay_draw (atoi $value)) (set_lay)") sets the variable lay_draw to the value selected by the user from the Layer dropdown list and executes the (set_lay) program function This function sets the current layer to the value that the user selected The following statements each set a variable btyp and execute a program function (set_view) This function changes the DCL image control (action_tile "wend" "(setq btyp 1) (set_view)") (action_tile "welev" "(setq btyp 2) (set_view)") (action_tile "wplan" "(setq btyp 3) (set_view)") The statement (action_tile "accept" "(setq ans 1) (done_dialog)") sets the variable ans to the number and executes the (done_dialog) AutoLISP function This function closes the dialog box when the user clicks the OK button The last action_tile statement (action_tile "cancel" "(setq ans 0) (done_dialog)") is executed when the user clicks the Cancel button This sets the variable ans to the number and executes the function (done_dialog), which in turn closes the dialog box If the user clicks the Cancel button, the program stops and doesn't execute anything The program finally executes the function that draws the W-beam depending on which view is selected, as follows: (if (and (= ans 1) (= btyp 1)) (draw_beam_end)) (if (and (= ans 1) (= btyp 2)) (draw_beam_elev)) (if (and (= ans 1) (= btyp 3)) (draw_beam_plan)) If the End option button is selected, the btyp variable will be and the program will execute the (draw_beam_end) program function If the Elev option button is selected, the btyp variable will be and the program will execute the (draw_beam_elev) program function If the Plan option button is selected, the btyp variable will be and the program will execute the (draw_beam_plan) program function What are those functions doing? The (draw_beam_end) function prompts the user for the Starting point of the W-beam and draws the Wbeam using the AutoCAD LINE command according to the size selected by the user The W-beam flange width, flange thickness, web thickness and beam depth are set in the (set_constants) program function The function calculates the other points needed to draw the end view and then draws the view on the layer that the user selects no 88-2001.doc 20 of 27 The (draw_beam_elev) function prompts the user for the Starting point of the W-beam and the Ending point of the beam This is the base point by which all other points will be calculated The program calculates the other points of the W-beam and draws the W-beam elevation view on the layer that the user selects The (draw_beam_plan) function prompts the user for the Starting point of the W-beam and the Ending point Like the (draw_beam_elev) function, this point is the base by which all other points are calculated to draw the plan view of the W-beam The program calculates the other points and draws the plan view of the W-beam using the AutoCAD LINE command on the layer that the user selects Conclusion Drawing different views of a 2-D structural W-beam doesn't have to be a chore In this article, we showed you how the DCL interface of the DDWBEAM program gets the necessary input from the user for the AutoLISP portion of the program Then, we showed you how the AutoLISP portion of the program draws the 2-D structural W-beam according to the size, layer and view that the user selects Listing B: The main AutoLISP code for DDWBEAM ; ; DDWBEAM.LSP 1.0; ; (defun draw_beam_end () (setvar "cmdecho" 0) (setq la (getvar "clayer")) (if (= lay "T") (setvar "clayer" la) (setvar "clayer" lay) ) (setq p1 (getpoint "\nStart point of WBeam: ")) (setq p2 (list (+ (car p1) t_flg_wd) (cadr p1))) (setq p3 (list (car p2) (- (cadr p2) t_thk))) (setq p4 (list (+ (- (car p3) (* 0.5 t_flg_wd)) (* 0.5 t_stem)) (cadr p3))) (setq p5 (list (car p4) (- (cadr p1) (- w_depth t_thk)))) (setq p6 (list (car p3) (cadr p5))) (setq p7 (list (car p6) (- (cadr p6) t_thk))) (setq p8 (list (car p1) (cadr p7))) (setq p9 (list (car p8) (cadr p5))) (setq p10 (list (- (car p5) t_stem) (cadr p5))) (setq p11 (list (car p10) (cadr p4))) (setq p12 (list (car p1) (cadr p11))) (command "line" p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 "C") ) ; ; no 88-2001.doc 21 of 27 (defun draw_beam_elev () (setvar "cmdecho" 0) (setvar "orthomode" 1) (setq la (getvar "clayer")) (if (= lay "T") (setvar "clayer" la) (setvar "clayer" lay) ) (setq p1 (getpoint "\nStart point of WBeam: ")) (setq p2 (getpoint p1 "\nTo point: ")) (setq p3 (list (car p2) (- (cadr p2) w_depth))) (setq p4 (list (car p1) (cadr p3))) (setq p5 (list (car p1) (- (cadr p1) t_thk))) (setq p6 (list (car p2) (cadr p5))) (setq p7 (list (car p3) (+ (cadr p3) t_thk))) (setq p8 (list (car p4) (cadr p7))) (command "line" p1 p2 p3 p4 "C") (command "line" p5 p6 ^c) (command "line" p7 p8 ^c) ) ; ; (defun draw_beam_plan () (setvar "cmdecho" 0) (setvar "orthomode" 1) (setq la (getvar "clayer")) (if (= lay "T") (setvar "clayer" la) (setvar "clayer" lay) ) (setq p1 (getpoint "\nStart point of WBeam: ")) (setq p2 (getpoint p1 "\nTo point: ")) (setq p3 (list (+ (car p2) t_flg_wd) (cadr p2))) (setq p4 (list (car p3) (cadr p1))) (setq p5 (list (- (+ (car p1) (* 0.5 t_flg_wd)) (* 0.5 t_stem)) (cadr p1))) (setq p6 (list (car p5) (cadr p2))) (command "line" p1 p2 p3 p4 "C") (command "line" p5 p6 ^c) (command "change" "L" "" "P" "LT" "hidden" "") (setq p7 (list (+ (car p5) t_stem) (cadr p5))) (setq p8 (list (car p7) (cadr p2))) (command "line" p7 p8 ^c) (command "change" "L" "" "P" "LT" "hidden" "") ) ; ; (defun set_view () (if (= btyp 1) (progn (setq x (dimx_tile "image") y (dimy_tile no 88-2001.doc 22 of 27 "image")) (start_image "image") (fill_image 0 x y 0) (slide_image 0 x y "wbeam1") (end_image))) (if (= btyp 2) (progn (setq x (dimx_tile "image") y (dimy_tile "image")) (start_image "image") (fill_image 0 x y 0) (slide_image 0 x y "wbeam2") (end_image))) (if (= btyp 3) (progn (setq x (dimx_tile "image") y (dimy_tile "image")) (start_image "image") (fill_image 0 x y 0) (slide_image 0 x y "wbeam3") (end_image))) ) ; ; (defun set_tbl_list () (setq elist (tblnext "layer" 1)) (setq code 2) (setq lay_count 0) (if (not (or (= (cdr (assoc 70 elist)) 1) (= (cdr (a soc 70 elist)) 4))) (setq tbl_list (list (cdr (assoc code elist)))) (setq lay_count (+ lay_count 1)) ) (while (setq t (tblnext "layer")) (if (not (or (= (cdr (assoc 70 t)) 1) (= (cdr (a soc 70 t)) 4))) (setq tbl_list (cons (cdr (assoc code t)) tbl_list)) (setq lay_count (+ lay_count 1)) ) ) (setq tbl_list (reverse tbl_list)) (start_list "la_list") (mapcar 'add_list tbl_list) (end_list) (setq lay_count (strcat (rtos lay_count 0) no 88-2001.doc 23 of 27 " layers are Frozen")) (set_tile "message" lay_count) ) ; ; (defun set_lay () (setq count lay_draw) (setq tbl_list2 tbl_list) (if (= count 0) (setq lay (car tbl_list2))) (while (> count 0) (setq tbl_list2 (cdr tbl_list2)) (setq lay (car tbl_list2)) (setq count (- count 1)) ) ) ; ; ; (defun set_constants () (if (= tb "5x5x16.0") (progn (setq t_flg_wd 5.00) (setq t_stem 0.24) (setq t_thk 0.360) (setq w_depth 5.00))) (if (= tb "6x4x12.0") (progn (setq t_flg_wd 4.00) (setq t_stem 0.23) (setq t_thk 0.279) (setq w_depth 6.00))) (if (= tb "6x6x15.5") (progn (setq t_flg_wd 5.995) (setq t_stem 0.235) (setq t_thk 0.279) (setq w_depth 6.00))) (if (= tb "8x4x13.0") (progn (setq t_flg_wd 4.000) (setq t_stem 0.230) (setq t_thk 0.254) (setq w_depth 8.00))) (if (= tb "8x8x31.0") (progn (setq t_flg_wd 8.000) no 88-2001.doc 24 of 27 (setq t_stem 0.288) (setq t_thk 0.433) (setq w_depth 8.00))) (if (= tb "10x4x15.0") (progn (setq t_flg_wd 4.00) (setq t_stem 0.230) (setq t_thk 0.269) (setq w_depth 10.00))) (if (= tb "10x8x39.0") (progn (setq t_flg_wd 7.990) (setq t_stem 0.318) (setq t_thk 0.528) (setq w_depth 9.94))) (if (= tb "10x10x49.0") (progn (setq t_flg_wd 10.00) (setq t_stem 0.340) (setq t_thk 0.558) (setq w_depth 10.00))) (if (= tb "12x4x16.5") (progn (setq t_flg_wd 4.00) (setq t_stem 0.230) (setq t_thk 0.269) (setq w_depth 12.00))) (if (= tb "12x8x40.0") (progn (setq t_flg_wd 8.00) (setq t_stem 0.294) (setq t_thk 0.516) (setq w_depth 11.94))) (if (= tb "12x12x65.0") (progn (setq t_flg_wd 12.00) (setq t_stem 0.390) (setq t_thk 0.606) (setq w_depth 12.12))) ) ; ; ; (defun set_beam_list () no 88-2001.doc 25 of 27 (setq tee_list (list "5x5x16.0" "6x4x12.0" "6x6x15.5" "8x4x13.0" "8x8x31.0" "10x4x15.0" "10x8x39.0" "10x10x49.0" "12x4x16.5" "12x8x40.0" "12x12x65.0")) (start_list "te_list") (mapcar 'add_list tee_list) (end_list) ) ; ; ; (defun set_beam () (setq count t_list) (setq tee_list2 tee_list) (if (= count 0) (setq tb (car tee_list2))) (while (> count 0) (setq tee_list2 (cdr tee_list2)) (setq tb (car tee_list2)) (setq count (- count 1)) ) (set_constants) ) ; (defun c:ddwbeam () (setvar "cmdecho" 0) (setq os (getvar "osmode")) (setvar "osmode" 0) (setq dcl_id (load_dialog "ddwbeam.dcl")) (if (not (new_dialog "wbeam" dcl_id)) (exit)) (setq x (dimx_tile "image") y (dimy_tile "image")) (start_image "image") (fill_image 0 x y 0) (slide_image 0 x y "wbeam1") (end_image) (setq lay "T") (mode_tile "wend" 2) (if (= t_list nil) (setq t_list 1)) (setq btyp 1) (setq ans 0) (set_tbl_list) (set_beam_list) (set_beam) (action_tile "te_list" "(setq t_list (atoi $value)) (set_beam)") no 88-2001.doc 26 of 27 (action_tile "la_list" "(setq lay_draw (atoi $value)) (set_lay)") (action_tile "wend" "(setq btyp 1) (set_view)") (action_tile "welev" "(setq btyp 2) (set_view)") (action_tile "wplan" "(setq btyp 3) (set_view)") (action_tile "accept" "(setq ans 1) (done_dialog)") (action_tile "cancel" "(setq ans 0) (done_dialog)") (start_dialog) (unload_dialog dcl_id) (if (and (= ans 1) (= btyp 1)) (draw_beam_end)) (if (and (= ans 1) (= btyp 2)) (draw_beam_elev)) (if (and (= ans 1) (= btyp 3)) (draw_beam_plan)) (setvar "clayer" la) (setvar "osmode" os) (princ) ) ; (princ "DDWBEAM 1.0 loaded.") (terpri) (princ "C:DDWBEAM") (print) ; INTERNET SOURCES RAPID PROTOTYPING WEB SITE Accelerated Technologies, Inc., launched a new Web site dedicated to rapid prototyping The site features more than 175 pages of original content including sixty pages on rapid prototyping technologies and twelve pages of tips and FAQs Atirapid.com also offers online material property sheets, listings of current events and industry news, and nine published articles http://www.atirapid.com BETTER WMF SOFTWARE www.furix.com http://x-filez.harem2.pl/b_more2.htm http://www.a-hoj.com/b_index1.php http://www.bugs2k.com/b-02.shtml http://www.orklanet.com/b.php AUTOCAD PRODUCTIVITY TOOLS DotSoft announced ToolPac 6, a comprehensive collection of productivity tools for AutoCAD R14/2000/2000i/2002 ToolPac features more than 600 functions such as annotation tools, block and attribute tools, layer management tools, object management controls, display tools, drawing aids, and no 88-2001.doc 27 of 27 hatch tools There are also tools for image control, inquiry, mtext, object conversion, polyline, xref, tables, and text For more information, go to http://www.dotsoft.com SUBSCRIBING/UNSUBSCRIBE AND SENDING COMMENTS ***************************************************************************** + To unsubscribe from "VietCAD Bulletin", just click here: vietcad@fmail.vnn.vn?Subject=Remove: VietCAD Bulletin or send an email to: vietcad@fmail.vnn.vn with “Remove: VietCAD Bulletin:” in Subject line + Please Forward: It will be very much appreciated if you would forward this message to your colleagues, customers and collaborators in the CAD/CAM community With thanks and hoping you find VietCAD Bulletin a useful resource Thank you for sending us your comments about these news bulletins Although we cannot respond to everyone, please know that we consider your feedback very important Please note that we cannot respond to requests for technical support If you need technical assistance for an Autodesk product, please visit http://www.autodesk.com/support/index.htm for information about how you can obtain support Sincerely, The VietCAD News Bulletin Staff -VietCAD Company Ltd Ngo Van Nam, Q 1, HCMC Tel: (08) 8272 144 / 145 Fax: (08) 8239 903 Hotline: 0903-920632 Email: vietcad@fmail.vnn.vn Website: www.vietcad.com Copyright (c) 2000 by VietCAD Co., Ltd reproduction or distribution in whole or in part without written permission is prohibited Third Party Trademarks All brand names, product names, or trademarks belong to their respective holders [...]... 13 of 27 USE THE COPYLINK COMMAND TO INSERT A DRAWING AS AN OLE OBJECT IN AUTOCAD (14/2000) A quick way to insert one drawing into another drawing as an OLE object is to use the COPYLINK command To do this, open the drawing you want to insert into another drawing Then enter copylink on the command line to copy the drawing to the Clipboard Open the drawing you want to insert the original drawing into... that the user selects There's necessary information needed from the user to perform the task of drawing the W-beam in the different views The elevation view of the W-beam consists of a rectangle with two horizontal lines designating the thickness of the flange To create this, the AutoCAD LINE command requires two points: the Starting point and the Ending point The program solution is to prompt the user... layer that the user selects no 88-2001.doc 20 of 27 The (draw_beam_elev) function prompts the user for the Starting point of the W-beam and the Ending point of the beam This is the base point by which all other points will be calculated The program calculates the other points of the W-beam and draws the W-beam elevation view on the layer that the user selects The (draw_beam_plan) function prompts the user... prompts the user for the Starting point of the W-beam and the Ending point Like the (draw_beam_elev) function, this point is the base by which all other points are calculated to draw the plan view of the W-beam The program calculates the other points and draws the plan view of the W-beam using the AutoCAD LINE command on the layer that the user selects Conclusion Drawing different views of a 2-D structural... doing? The (draw_beam_end) function prompts the user for the Starting point of the W-beam and draws the Wbeam using the AutoCAD LINE command according to the size selected by the user The W-beam flange width, flange thickness, web thickness and beam depth are set in the (set_constants) program function The function calculates the other points needed to draw the end view and then draws the view on the. .. for the Starting and Ending points and programmatically determine the other points needed to draw the elevation view no 88-2001.doc 15 of 27 The end view of the structural W-beam is also drawn using the AutoCAD LINE command; however, there are 12 points required to draw this view The program solution is to prompt the user for the Starting point of the W-beam and programmatically determine the other... the command line to execute the program The program executes the main function named C:DDWBEAM The primary task of the program's main function is to load the dialog control language definition of the dialog box (DDWBEAM.dcl) and execute several functions to load the drawing layer definitions and the list of Wbeam sizes See Listing B for a listing of the DDWBEAM AutoLISP code Listing B: The main AutoLISP... structural W-beam doesn't have to be a chore In this article, we showed you how the DCL interface of the DDWBEAM program gets the necessary input from the user for the AutoLISP portion of the program Then, we showed you how the AutoLISP portion of the program draws the 2-D structural W-beam according to the size, layer and view that the user selects Listing B: The main AutoLISP code for DDWBEAM ; ; DDWBEAM.LSP... and what inputs the program will determine For the DDWBEAM program, the user will pick the Starting and Ending points for the elevation and plan views and the Starting point for the end view The user will also select the size of the W-beam, the layer on which the W-beam will be drawn, and the view of the Wbeam There are several methods available to achieve the user input; however, the DDWBEAM program... needed to draw the end view Drawing the plan view of the W-beam is similar to drawing the end view in that the plan view is a rectangular object with two hidden lines representing the web thickness of the W-beam The program solution is to prompt the user for the Starting and Ending points and programmatically determine the other points The next program problem is to figure out what command inputs the

Ngày đăng: 22/04/2016, 00:30

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan