Wednesday, April 29, 2009

Learn how to migrate from VBA to .NET for AutoCAD

VBA is going away from AutoCAD in a coming release but ActiveX that is the API will remain so you can use the same API you are familiar with within .NET using COM Interop. So if you’re familiar with the ActiveX Object Model you get get up and running in .NET quicker.

In the four examples in this Autodesk Developer Network Network DevTV Visual Basic Express is used and you learn how to prepare code to use late binding and then export from VBA via VB6 format and end up with VB.NET code. There is even a great free macro that makes the VB6 project without requiring VB6.

AutoCAD VBA to .NET Migration Basics
view
download (140 Mb)
supporting files (1.72 Mb)

  • Example 1 is showing manual migration using VB6
  • Example 2 is showing the migration using the migration macro
  • Example 3 is dealing with user forms and problems with late binding and why it is good to change Object to something more specific using early binding
  • Example 4 is for referencing other type libraries than the AutoCAD ones. The example shows object referencing Excel and Word

Via Through the Interface

See also the posts More details on VBA in AutoCAD 2010 products, AutoCAD 2010 VBA and VSTA future and No VBA installed with AutoCAD 2010

Monday, April 27, 2009

Network License Activation Utility not on AutoCAD 2010 DVD

The Autodesk Network Licensing Guide for AutoCAD 2010 or AutoCAD Architecture 2010 refers to “How to Install and Use the Network License Activation Utility”.But where is it? Where can it be found? You should notice that this utility has been discontinued but the guide has not been updated accordingly.

You can activate your license by going to http://www.autodesk.com/register and following the on-screen instructions or by calling Autodesk Activations at 1-800-551-1490 and choosing #1 for English and #2 for Network License.

The location for the Autodesk Network Licensing Guide is found in the Help folder where AutoCAD or the vertical is installed.

C:\Program Files\AutoCAD 2010\Help\adsk_nlg.chm

Autodesk Stand-Alone Licensing Guide is named adsk_slg.chm and found in the same Help folder.

See also AutoCAD 2010 network license – not much news

PS. A tip to Autodesk is to make these guides available at http://www.autodesk.com/autocad-help

Sunday, April 26, 2009

OSNAPZ changes can change your AutoCAD screen background with the OsnapzBG freeware

When OSNAPZ is changed many have found it useful to have a more visual change to indicate its state. In verticals like AutoCAD Architecture you have a small button that indicates the state of the “Z lock” but some might want to even have also the background color change just like the Block Editor changes the background color.

I have made this background color changer for OSNAPZ tool available as a freeware.

If you find it useful I would appreciate any contribution. Here is a PayPal link (credit cards also accepted) you can use and enter 1 EUR or more as Unit Price.

The program is available for AutoCAD 2009 32-bit, AutoCAD 2009 64-bit, AutoCAD 2010 32-bit, AutoCAD 2010 64-bit. It also works for all AutoCAD based verticals. I might be able to support other versions if needed.

Download the OsnapzBG freeware and see the readme.txt in the OsnapzBG.zip file for instructions how to auto load and use it.

Here is what it look like in AutoCAD Architecture. “Replace Z value with current elevation” is the button the application status bar.

Change AutoCAD screen background color based on OSNAPZ includes Visual LISP (AutoLISP) code to does this but there is one limitation that it cancel any running command so it cannot be used transparently. Because of limitations with the Visual LISP solution I decided to make it in .NET instead.

Expression Web installation error 2203 solution

I tried to install Microsoft Expression Web 2 on Windows Vista 64-bit today and got this error during the setup: “Error: Installation of the "Microsoft Expression Web 2" product has reported the following error: 2203.”

The solution in my case was to disable Carbonite online backup during the installation.

Friday, April 24, 2009

Sheet Set Manager Properties Editor 3.0 RC update 1

Soon SSMPropEditor 3.0 will be released. If you want to try it now here is a sneak peek.

I appreciate all comments by testers of the previous release candidate and I hope all bugs are squeezed but if you find any please let me know.

One big news in this update is the Unlock/Lock button that let you release the lock of the Sheet Set so you can see changes directly in AutoCAD.

Another new thing is that you can have changes applied automatically.

English version

http://www.jtbworld.com/download/SSMPropEditor_3.zip

German version

http://www.jtbworld.com/download/SSMPropEditor_3_de.zip

SSMPropEditor works even without having AutoCAD installed. It is compatible with all AutoCAD versions and verticals that uses the Sheet Set Manager or Project Manager. It has been tested with AutoCAD 2010 as well as Windows 7.

Contact us to get a time limited license file for free.

I hope you enjoy this new version and in a short while the final release will be available.

ShowModalDialog API changes in AutoCAD 2010

I got this error in some .NET code I updated to get running for AutoCAD 2010.

Error    1    Reference required to assembly 'PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' containing the implemented interface 'System.Windows.Interop.IWin32Window'. Add one to your project.    D:\VB.NET\MainProject\Mainclass.vb    15    74    MainProject

I found that I needed to change this code showing a modal dialog box.

Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog(Application.MainWindow, DialogObj)

to look like this as well as adding the PresentationCore reference.

Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog(Application.MainWindow.Handle, DialogObj, False)

Thursday, April 23, 2009

AutoCAD P&ID 2010 released

Still new AutoCAD 2010 based products are released. This time it is time for AutoCAD P&ID 2010. Wondering when AutoCAD Plant 3D 2010 will come…

There are project improvements, support for curved schematic lines, inline equipment, end connections for inline instruments and more as can be seen below.

Press release: Autodesk Announces Availability of AutoCAD P&ID 2010 Software

                       AutoCAD P&ID 2010: Autodesk today announced that it is
                       shipping AutoCAD P&ID 2010 software, the new release of
                       its software application built specifically for
                       creating, modifying, and managing piping and
                       instrumentation diagrams. Built on the AutoCAD 2010
                       platform, AutoCAD P&ID is familiar and easier to use,
                       allowing design and engineering teams to start working
                       with minimal training. Common tasks are more
                       streamlined and automated to help boost productivity,
                       while designers have easier access to more accurate
                       component and line information.

                       AutoCAD P&ID 2010 provides the following new features
                       to further enhance ease of use; help increase designer
                       productivity; and support information accuracy:

                       Project setup restricted access - The project
                       administrator or lead can restrict user access to
                       Project Setup using Microsoft Windows File Permissions.

                       Project specific tool palettes setup - Tool palette
                       groups may be associated with a specific project so
                       that all users access the standard set of symbols for
                       the project.  As each project may require specific sets
                       of symbols, AutoCAD may be used to create custom tool
                       palettes and groups.

                       Curved schematic lines - Polylines with arcs, filleted
                       polylines, and splines can be converted to form curved
                       SLINEs.  This feature is useful for showing tubing and
                       flexible hose piping.

                       Inline equipment - ISO and DIN Equipment such as pumps,
                       compressors, blowers, and filters can be inserted into
                       pipelines.  Equipment will break the pipeline into two
                       with different line numbers and be correctly oriented
                       along the proper flow direction.

                       End connections for inline instruments - End
                       connections - flanged, welded, socket welded, and
                       threaded, among others - can be applied on control
                       valves and inline instruments

                       Japanese Industrial Standard instrumentation symbols -
                       A Japan (metric) project template is available that
                       includes ISO and JIS Z 8204, the Japanese Industrial
                       Standard instrumentations symbols.

                       In addition to these productivity enhancements, AutoCAD
                       P&ID 2010 includes all the functionality of the new
                       AutoCAD 2010 platform and will integrate with the
                       forthcoming AutoCAD Plant 3D product.

                       Includes all functionality of new AutoCAD 2010 Platform
                       AutoCAD P&ID 2010 includes the intuitive interface and
                       all of the functionality of the new AutoCAD 2010
                       platform. AutoCAD 2010 enables designers to more easily
                       create innovative designs with the addition of new
                       free-form design tools and offers new PDF Import and
                       Underlay and other enhanced publishing features; new
                       parametric drawing tools; and 3D printing.

                       Integrated AutoCAD P&ID and AutoCAD Plant 3D
                       environment AutoCAD P&ID and the forthcoming AutoCAD
                       Plant 3D can share a single integrated project, making
                       data exchange smoother and more seamless.  Piping
                       designers can review AutoCAD P&ID data and
                       process designers can review AutoCAD Plant 3D data.
                       Both share a common user interface and components --
                       such as Project Manager and Data Manager -- making
                       learning and using easier.

Cascading sequence for Autodesk 2010 products

Here you find all about how the licenses of the product features cascade for network licenses (FLEXlm / FLEXnet).

Knowledge Base document: Cascading sequence for 2010 products

Unfortunately when you check the license status with LMTOOLS.EXE or LMUTIL.EXE you do not see what application the client really is using because of how FLEXnet reports cascading usage. This is also of course reflecting the result in JTB FlexReport. But if enough customers would find it useful to really see what application is using the license I will consider supporting it anyway. Let me know if you’re interested in this.

Here are some of them and several product names I’ve not seen before like “Autodesk Design Academy 2010”:

AutoCAD Architecture 2010 Cascading Sequence:
AutoCAD Architecture 2010
AutoCAD Revit Architecture Suite 2010
AutoCAD Revit Architecture Visualization Suite 2010
Autodesk Education Master Suite 2010
Autodesk Education Suite for Architecture and Engineering 2010
Autodesk Design Academy 2010

AutoCAD 2010 Cascading Sequence:
AutoCAD 2010
AutoCAD Mechanical 2010
AutoCAD Visualization Suite 2010
AutoCAD Revit Architecture Visualization Suite 2010
Autodesk Building Fabrication Suite 2010
AutoCAD Revit Architecture Suite 2010
AutoCAD Revit Structure Suite 2010
Autodesk Education Master Suite 2010
Autodesk Education Suite for Architecture and Engineering 2010
Autodesk Education Suite for Civil and Structural Engineering 2010
Autodesk Education Suite for Industrial Design 2010
Autodesk Design Academy 2010

Navisworks Review 2010 Cascading Sequence:
Autodesk Navisworks Review 2010
Autodesk Navisworks Simulate 2010
Autodesk Navisworks Manage 2010
AutoCAD Revit Architecture Visualization Suite 2010
Autodesk Building Fabrication Suite 2010

Autodesk Revit Architecture 2010 Cascading Sequence:
Autodesk Revit Architecture 2010
AutoCAD Revit Architecture Suite 2010
AutoCAD Revit Architecture Visualization Suite 2010
Autodesk Education Master Suite 2010
Autodesk Education Suite for Architecture and Engineering 2010
Autodesk Design Academy 2010

Autodesk Revit Structure 2010 Cascading Sequence:
Autodesk Revit Structure 2010
AutoCAD Revit Structure Suite 2010
Autodesk Building Fabrication Suite 2010
Autodesk Education Master Suite 2010
Autodesk Education Suite for Architecture and Engineering 2010
Autodesk Education Suite for Civil and Structural Engineering 2010

For the 2010 products, the PLIST increment is no longer include in the license file but is now stored in a new external file named ProductInformation.pit. License files will still include PLIST increments for legacy products, however 2010 products will reference the ProductInformation.pit file for the required PLIST information. – read more on Without A Net

See also these posts that talks about cascading.

Network license news in AutoCAD 2009

AutoCAD 2007 and Network Licensing

PLIST increment in Autodesk license files

Wednesday, April 22, 2009

Navisworks 2010 video

The Navisworks products are great to use to coordinate, locate clashes and review larger projects.

Here is one about Navisworks for manufacturing

And one about Navisworks for the Architect

Via Beyond the Paper that now also posts about Navisworks besides DWF and Autodesk Design Review. I see several things that Navisworks has in common with Design Review and it would not surprise me to see them merge in the future.

Tuesday, April 21, 2009

AutoCAD Architecture 2010 stopped working at startup

I made an installation of ACA 2010 64-bit on Vista 64-bit and after after installation I could not start ACA. I tried to make a repair and still same problem.

It almost started ACA completely but then I got “AutoCAD Application has stopped working. A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.” I did not get any CER dialog after that. acad.exe just then silently crashed.

As I have Visual Studio 2008 I did also try the Debug option and after that I actually got a CER dialog. Other than that the only thing to do was Close program.

I tried the Process Monitor and identified that the last loaded ARX file was AcPEXCtl.arx so I renamed it and was able to launch ACA just fine.

Update. So much for this workaround. Today AutoCAD Architecture 2010 crashed again so it seem to not be related to this ARX file anyway.

Anyone knowing what AcPEXCtl.arx is and why this happens?

I noticed that if I got ACA running I could after that manually load AcPEXCtl.arx without any problem.

Update and my solution.

I tried with /nohardware switch and it didn’t work but when I also run it as administrator as well I got it running. After that I could start it as normal.

Disable Alt+Click for download in Firefox

I have not found a way to disable the Alt keyboard shortcut that activates a download of the link you click on. It can be a real file or even a html page. This is a timesaver when you quickly want to download files in Mozilla Firefox.

Why did I want to disable it then?

I have found that often the download is triggered unintentionally. Eventually I found that this happened accidentally if I clicked on a link and then after that quickly pressed Alt+Tab to switch to another application. Somehow pressing the Alt after clicking on the link also activated the download.

Here is the workaround that I found working after some research of the settings.

Enter about:config in the address field. about:config is where all user preferences can be viewed and modified in Firefox.

Locate browser.download.saveLinkAsFilenameTimeout and lower the value. I tried 100 milliseconds and have not seen any problems so far. If I run into problems I will try to set it a bit higher.

Some URLs use Content-Disposition headers to tell browsers what to use for a filename when saving a file. This filename may not match the URL. When choosing “Save Link As...” from a link’s context menu, Mozilla must request the URL to find out the filename from a Content-Disposition header. Since this is not as fast as merely using the URL itself to generate a filename, Mozilla will time out after a short time waiting for the headers. This preference determines that timeout.

Number of milliseconds to wait when retrieving the filename from Content-Disposition headers before resorting to the original URL’s filename. Default is 1000 (1 second).

Hopefully there is a better way as this workaround might have side effects when downloading some URLs.

Monday, April 20, 2009

Extract volume and vertex coordinates from 3Dsolids

This and more information can easily be extracted from AutoCAD DWG files. The process can be automated and exported into most custom formats based on user requirements. I just did a project like this using the Brep API for .NET that was added to AutoCAD 2009. I used AutoCAD 2010, Visual Studio 2008 and C# for this referencing C:\Program Files\AutoCAD 2010\acdbmgdbrep.dll.

The 3dsolids are composed of Complexes, Shells, Faces, Loops and Edges.

Friday, April 17, 2009

The end of SDI for AutoCAD

The days are counted when it comes to having support for SDI (Single Document Interface) mode in AutoCAD according to Through the Interface: SDI, the end is nigh.

I do have a few AutoLISP based applications that require SDI set to 1 because it was an easy way to process multiple drawings. I will see if I will update the AutoLISP code or migrate it to .NET.

Some of the latest blog posts

Subscribe to RSS headline updates from:
Powered by FeedBurner

Contact Us | About JTB World | Website General Terms of Use | Privacy Policy
^ Top of page

© 2004- JTB World. All rights reserved.