Wednesday, March 16, 2011

Package licenses and prior version support

Soon time for more Autodesk 2012 products to be released like AutoCAD 2012 and license file updates are needed.

Package features are having the suffix “_F” as in the AutoCAD package feature 64300ACD_F and in the license file it is easy to see what features/components it consists of.

PACKAGE 64300ACD_F adskflex 1.000 COMPONENTS="85730ACD_2012_0F \
85536ACD_2011_0F 71200ACD_2010_0F 57600ACD_2009_0F"

When reporting on usage of AutoCAD in JTB FlexReport use the package feature to see any of the usage of all included versions.

In the above case AutoCAD package feature 64300ACD_F will include usage of either of the versions from 2009 up to 2012. But in JTB FlexReport historical usage will of course include older versions if they were in the package before a license file change.

It is also possible to select multiple versions and aggregate their usage in JTB FlexReport but best practice and easiest is to use the package feature.

From Autodesk Knowledge base:

Understanding package licenses and prior version support

Issue
You received an Autodesk license file containing a PACKAGE increment allowing for prior version support and you would like to understand more about package licenses and how to use them.
Solution

Autodesk package licenses are a benefit to Subscription customers that provides a set number of licenses for four different versions of your software: the current version, plus the three previous versions of the same product. Running an instance of any one of these versions consumes one license in the package. Running more than one version, even on the same machine, will consume more than one license in the package.

For example, if you have a package license for two seats of AutoCAD 2012, the following scenarios can be expected:

  • You can install and run AutoCAD 2012, 2011, 2010, and 2009.
  • Two computers, each running AutoCAD 2012, will consume two licenses. No licenses will be available for other users.
  • One computer, running AutoCAD 2012 and AutoCAD 2011 simultaneously, will consume two licenses. No licenses will be available for other users.
  • One computer, running three instances of AutoCAD 2009 will consume only one license. One license will still be available for other users.

Package License FAQ:

Q: Can I configure which products or product versions are licensed in a package?

A: No. Package license files come with the current version and three previous versions of the same product only. It is not possible to configure the products included in the package in any way.


Q: How do package licenses work with regard to borrowing and cascading?

A: License borrowing, options files and license cascading work the same for package license files as they do for regular license files. When you configure an options file, use the feature codes of the individual product versions contained within the package. For example, if you want to reserve 5 licenses of AutoCAD in an options file, you will need four separate RESERVE statements, one for the feature code that corresponds to each version.


Q: What happens if I get a new Package License file.

A: A new license file will supersede an older license file.


Q: Can I combine package license files?

A: Package license files may be combined as usual with license files for different products (see the solution, Combining Autodesk® license files, for more details) however you cannot package license files with non-package license files for product versions contained in the package. Doing so will disable the older license INCREMENT for the product and only the package license count will be available. For example, do not combine an AutoCAD 2012 package license file with a regular license file for AutoCAD 2011, 2010 or 2009.

Example:

The following is an example of a package license file for AutoCAD 2012:
SERVER myserver 12345678abcd
USE_SERVER
VENDOR adskflex port=2080
PACKAGE 64300ACD_F adskflex 1.000 COMPONENTS="85730ACD_2012_0F \
85536ACD_2011_0F 71200ACD_2010_0F 57600ACD_2009_0F" \
OPTIONS=SUITE SUPERSEDE ISSUED=11-Mar-2011 SIGN="0A16 AA48 \
D7D7 3F0F 6725 B01B 2E1B B7DB CC2E B13B 57C6 4069 F07A 8B10 \
D066 015C B7B7 F254 23B8 8C90 2B05 95D8 6977 4573 9FE8 3778 \
E2B0 3E3C 37D7 9A25" SIGN2="0941 23D1 7440 CFA3 FEAF A59F FF0A \
991D 9B96 7828 E4D9 4599 EFED 67AB 64AF 1E5C C7F8 25F0 31E5 \
C80F 1F34 EEE6 8482 8FB8 3D4A 9C7A 4E76 5EDA 0257 37D9"
INCREMENT 64300ACD_F adskflex 1.000 permanent 10 \
VENDOR_STRING=commercial:permanent SUPERSEDE DUP_GROUP=UH \
SUITE_DUP_GROUP=UHV ISSUED=11-Mar-2011 BORROW=4320 \
SN=321-12345678 SIGN="0C5A D542 CF18 C438 650D 53D1 2A0D EA18 \
B396 7C09 E502 41BD 8DD1 7D3E 5853 1266 FDA5 1E8B C19C 37AE \
3112 9CAC 8C08 9849 20B1 560C A102 67DE 7EB8 4CFD" SIGN2="1D37 \
164F B2D0 8364 96CC 1DD5 8782 C2D4 CA78 1D91 7DCC BE9F C116 \
0922 579C 12ED 8F0E ABBC 83FA 6C4A 3236 6683 858A 921F 6D35 \
9C23 40FC 4F36 8A4D 3F34"
INCREMENT PLIST adskflex 1.000 permanent 1 \
VENDOR_STRING=
A07:51600ACDLAND_2007_0F:52200CIV3D_2007_0F;B07:51900AMECH_PP_2007_0F
:51300INVBUN_11_0F:52900INVPRORS_11_0F:53000INVPROSIM_11_0F:51400INVPR
O_11_0F;C07:51200ACD_2007_0F:52500REVITS_9_0F:54100REVITS_9_1F:53700RE
VSU_3_0F:54200REVSU_4_0F;D07:52600REVIT_9_0F:52500REVITS_9_0F;E07:5760
0ACD_2009_0P:59300INVBUN_2009_0P;F07:51800BLDSYS_2007_0F:53100REVSYP_
1_0F:54500REVSYP_2_0F;G07:53400REVITST_3_0F:53700REVSU_3_0F;H07:54300R
EVIT_9_1F:54100REVITS_9_1F;I07:54400REVITST_4_0F:54200REVSU_4_0F;A08:55
500ACDLAND_2008_0F:55400CIV3D_2008_0F;B08:54900AMECH_PP_2008_0F:55000
INVBUN_2008_0F:55100INVPRORS_2008_0F:55200INVPROSIM_2008_0F:55300INVPR
O_2008_0F;C08:54600ACD_2008_0F:54700REVITS_2008_0F:54800REVSU_2008_0F;
D08:57100REVIT_2008_0F:54700REVITS_2008_0F;F08:55600BLDSYS_2008_0F:5570
0REVSYP_2008_0F;G08:57200REVITST_2008_0F:54800REVSU_2008_0F;A09:59800
ACDLAND_2009_0F:59700CIV3D_2009_0F;B09:59200AMECH_PP_2009_0F:59300IN
VBUN_2009_0F:59400INVPRORS_2009_0F:61700INVMFG_2009_0F:59500INVPRO
SIM_2009_0F:59\600INVPRO_2009_0F;C09:57600ACD_2009_0F:59200AMECH_PP
_2009_0F:78400ACDDS_2009_0F:60900REVITS_2009_0F:61000REVSU_2009_0F;
D09:62100REVIT_2009_0F:60900REVITS_2009_0F:78200RAV-S_2009_0F;F09:599
00BLDSYS_2009_0F:60000REVSYP_2009_0F;G09:62200REVITST_2009_0F:61000
REVSU_2009_0F;J09:67800RVTMPJ_2009_0F:60000REVSYP_2009_0F;K09:68800
CIVIL_2009_0F:59700CIV3D_2009_0F;L09:60100ARCHDESK_2009_0F:60900REVITS
_2009_0F:78200RAV-S_2009_0F;M09:68900NAVREV_2009_1F:78200RAV-S_2009_0F \
SUPERSEDE ISSUED=11-Mar-2011 SIGN="06CE BC9A E943 BC1B 0CC9 \
3557 66ED 932C EF2D 97FF 709E CC0E DD8B D03E 3583 171E 35C3 \
9C59 047A DC7E 200D 2FFB 97D8 E5A6 47DE 3A52 BFC2 B27C 37BF \
4E77" SIGN2="1DBB D46E 7B99 7EAE 0638 0333 656E 1EFE D4BB ABEF \
63FD A04D 4238 B385 ECB5 1E60 E70B FD8E 7C59 828D DD65 464A \
EA4B 7472 35F8 6DC3 3762 9BAB 3966 33E9"

Autodesk Subscription Use of Previous Version FAQ (PDF):

Q: What is use of “Previous Version”?

A: Subscription customers are entitled to use certain Previous Versions of Autodesk products concurrently with the most current release if they meet certain conditions.


Q: What Previous Versions are eligible?

A: For most products, Subscription customers may use versions previous to the current release, subject to availability. Availability can be found on the on the “Eligible Product List for Previous Version Use”. To access this list, Contract Managers and Software coordinators can refer to Subscription Center at www.autodesk.com/subscriptionlogin. Once logged in click on the Subscription Administration link on the left navigation.


Q: What if the product is not on the Previous Version Eligible Product List?

A: For products not on the “Eligible Product List for Previous Version Use”, the Subscription customer may still be allowed to use of a Previous Version if the customer legally owned it, and, in those instances, only up to the number of licenses originally owned.


Q: How many additional licenses am I granted with this Previous Version benefit?

A: Autodesk is not granting any additional licenses. Under this benefit, the Subscription customer may  use any combination of the current version and its eligible Previous Versions as listed on the “Eligible Product List for Previous Version Use” up to the total number of licenses of the product currently under Subscription. For example: If the company has licenses for five seats of a current product, each of the five users can run their choice of version of the current and eligible Previous Versions in any combination up to five seats.


Q: Is there any difference in the Previous Version benefit based on deployment type (i.e.,
standalone or network)?

A: The Previous Version benefit applies to both standalone and network deployments although the process for accessing the Subscription benefit may differ with deployment type. For more information Contract Manager and/or the Software Coordinators can refer to Subscription Center at www.autodesk.com/subscriptionlogin. Once logged in click on the Subscription Administration link on the left navigation.


Q: If a Subscription customer has a network license, how do they access Previous Versions?

A: A current network license file will be generated for products under Subscription to provide access to the current version plus prior versions stated on the “Eligible Product List for Previous Version Use”. For more information and to generate a network license file visit registeronce.autodesk.com .


Q: What happens if I have a standalone license?

A: Subscription customers with a current standalone license will also have access to the Previous Versions in accordance to the “Eligible Product List for Previous Version Use”; the customer will need a serial number for each version they wish to activate. Customers may request a serial number for activation with help from the step‐by‐step guide on the Subscription Center.


Q: Do Previous Version benefits apply to products that have been upgraded to a different product?

A: No. Once the Subscription customer upgrades to a different product Previous Version use benefits only apply to Previous Versions of the customer’s new product. Subscription customers will have access to Previous Versions that are in the “Eligible Product List for Previous Version Use”


Q: Does Previous Version benefit apply to Education and Commercial licenses?

A: All applicable products are defined in the “Eligible Product List for Previous Version Use”.


Q: Does the Home Use benefit apply for Previous Versions?

A: Yes. Home Use is allowed for all products on the “Eligible Product List for Home Use”, for prior versions allowed for home use refer to the “Eligible Product List for Previous Version Use”.


Q: Can a Subscription Customer us their Previous Version on a different computer than the one their current release is installed on?

A: Please refer to the legal terms and conditions for product usage.


Q: Will Autodesk provide product support for Previous Version?

A: Autodesk will provide product support for products on the “Eligible Product List for Previous Version Use”.


Q: Will the Subscription Customer be able to access Previous Versions for their Suite?

A: With the first shipment of a Suite, the component products of the Suite (if included on the “Eligible Product List for Previous Version Use”) are available for Previous Version use. When the next version of the Suite ships the prior version of the Suite may become a Previous Version and be listed on the “Eligible Product List for Previous Version Use”, with the earlier versions of component products of the Suite potentially remaining on the “Eligible Product List for Previous Version Use” as Previous Versions for the Suite. Eventually, all Previous Versions for a Suite will be earlier releases of that Suite rather than earlier releases of component products of that Suite.


Q: How will network licenses for Suites differ from individual product network licenses?

A: Subscription customers will receive network licenses that provide access to applicable versions for all eligible suites and individual products. In an effort to offer prior version entitlement for Suites that did not exist in prior release years, these Suite licenses will provide access to individual component products that are included with the current Suite offering. This component level management exists for products included with a Suite that existed as an individual product in any or all three prior release years. Upon its fourth release year, all prior version entitlement will be managed at the Suite level. This implementation drives two deviations from individual product behavior over the first three releases of a Suite.
The difference is in how license seats are consumed. For release years that are managed at the suite level a single license will be pulled regardless of how many applications are run within the same release year that are included in the suite when run concurrently at the same workstation. Running applications across multiple release years will result in a license pull for each release year. For the prior versions managed at the component level, each component product will pull a license when run concurrently on the same workstation. You may run as many sessions of the same release year of a specific component product and only consume a single license.
For example, if you have Autodesk Design Suite Premium 2012 on subscription and a user starts AutoCAD 2012 and 3ds Max Design 2012 on the same workstation at the same time, only one license is consumed. If the user starts AutoCAD 2010 and 3ds Max Design 2010 on the same workstation at the same time, two licenses are consumed. If AutoCAD 2012, 2011 and 2010 are run together, three licenses are consumed.


Q: How it will be different for prior version entitlements of Suites and individual products?

A: The difference is how prior version entitlements of suites and individual products interact. If you have a Subscription network license file on the same license server as a one or more component product license files you will have to have to obtain license files for all products on the same day in order to realize your full prior version entitlement. This only applies to prior version release years managed at the component level.

For example, if you have a 100 seat license for Autodesk Design Suite Premium 2012 on subscription and are also managing a 20 seat license of AutoCAD also under subscription and 5 seats of 3ds MAX 2010 which is not on subscription on the same license server. If the license file creation dates are first for the Suite, second for AutoCAD and last for 3ds MAX then up to 5 users could access 3dsMAX 2010, 20 users could access AutoCAD 2011, 2010 or 2009. Up to 120 users could access AutoCAD 2012 and 100 could access other xxx Suite programs. If all three license files are generated on the same day the following availability will apply. Up to120 users could run their choice of AutoCAD 2012, 2011, 2010 or 2009 and up to 105 users could run 3ds MAX 2010. Up to 100 seats of all other xxx Suite products could be run.


Q: How does the Subscription Customer request a Previous Version license?

A: As a Contract Manager or a Software Coordinator of a Subscription contract they can go to the Contract Administration of Subscription Center, where they will find all Previous Version information and step by step instructions for activation.


Q: How long does Previous Version use last?

A: The Subscription customer may exercise the Previous Version use rights specified in the Subscription terms and conditions for a given Autodesk product so long as that product remains on Subscription. Please see question 19, below, for a discussion of what happens when a customer’s Subscription lapses.


Q: Will the Subscription Customer be able to get physical media for Previous Version license?

A: Yes. CD or DVD for eligible Previous Versions is available through the global media replacement site through subscription center from the download tab.


Q: What will happen to the Subscription Customers Previous Version use if they allow their Subscription to lapse?

A: The Previous Version use rights set forth in the Subscription Terms and Conditions cease when Subscription lapses. This means that the customer may no longer have multiple releases (i.e., Previous Versions and the current release) of a given product concurrently installed, and must immediately reduce the quantity of Autodesk software products installed to the quantity that the customer has licensed. Under the applicable Autodesk software license, this means that the customer may elect to uninstall all but the most current release, or alternately all but one of the Previous Versions. Thereafter, if the customer elects to install an newer release (called and “Upgrade”) of the software product, the provisions of the applicable Autodesk software license agreement will apply and will require that the customer uninstall the earlier release within a stated period of time after their installation of the newer release. If the customer desires to resume using
that prior release, their Subscription will need to be re‐instated so that they can do so as a Previous Version under the Subscription terms and conditions. The customer will need to contact their Autodesk Authorized Reseller or Autodesk Sales Rep for next steps.


Q: What will happen to a customers packaged network license if they allow their Subscription membership to lapse?

A: What will happen to a customers packaged network license if they allow their Subscription membership to lapse?


Q: Where to go for more Previous Version information?

A: For more information regarding Previous Version use please login to Subscription Center at www.autodesk.com/subscriptionlogin. Once logged in click on the Subscription Administration link on the left navigation.


See also:

Network license news in AutoCAD 2009

Package license file introduced with AutoCAD 2009

Prior version support and license usage of Autodesk 2012 Suite products

Monday, March 14, 2011

Windows 7 installation partition failure and easy solution

The error is: Setup was unable to create a new system partition or locate an existing system partition. See the setup log files for more information.

The solution is to unplug any boot devices that are connected via USB like an external hard drive.

If you really want to find the setup log files see here.

Wednesday, March 9, 2011

Windows Live Writer 400 Bad Request solution

If you get the following error trying to Publish in WLW it is easy to fix:
The server reported an error with the following web address:
http://www.blogger.com/feeds/4011252463639388552/posts/default
400 Bad Request
Invalid category term

The reason is probably that you added some characters in the category that are not accepted like an exclamation. The solution is to remove or change the category.

Tuesday, March 8, 2011

How to make MagiCAD network licenses report correctly

Several customers of JTB FlexReport uses the great MagiCAD products from Progman for Building Services (HVAC, piping, plumbing, sprinkler and electrical systems) CAD/BIM work in AutoCAD, AutoCAD Architecture and Revit.

After their latest release 2010.11 I got reports about a FlexNet/FLEXlm problem where only one license was reported in use even though more licenses were used. Example of magicad vendor daemon features involved are magie2, magihp2, magir2, magiree2, magirep2, magirev2, magispr2 and magiv2.

I contacted Progman about this and quickly got this confirmation of the problem and a workaround.

“Yes, we are aware of the error in our licensing, which causes the mentioned “feature”. You are able to get rid of this error by returning and activate their MagiCAD licenses. After this you are able to monitor license usage situation correctly.”

Monday, March 7, 2011

Autodesk Launches 2012 Digital Entertainment Creation Products

Autodesk has started to launch their 2012 products. Here’s from the press release:

Autodesk, Inc. announced new releases of the company’s digital entertainment creation software and middleware. The 2012 versions enable iterative workflows, help users manage complexity and provide new creative tools. Autodesk products have been used to create popular movies like “Black Swan,” chart-topping video games such as “Medal of Honor,” primetime television commercials like the “Bridgestone ‘Carma’” Super Bowl ad and hit television shows such as “Glee.”

All products in the latest Entertainment Creation Suites offer notable new features and enhancements:

  • Autodesk 3ds Max 2012 software delivers a new accelerated graphics core, mRigids for dynamic rigid-body simulations in the viewport and new sculpting and painting enhancements like the Clone brush
  • Autodesk Maya 2012 software provides significant enhancements to the viewport offering full-screen effects, editable motion trails for animation editing in the viewport, as well as new simulation options
  • Autodesk Softimage 2012 software provides new procedural ICE modeling, integrated Syflex cloth simulation, stereoscopic capabilities and multiple core software development kit (SDK) additions
  • Autodesk Mudbox 2012 software delivers enhancements to the painting toolset, innovative new UV and topology-independent workflows, practical posing tools and improved large dataset handling
  • Autodesk MotionBuilder 2012 software provides new in-viewport stereoscopic display and camera rig, a unified interface and solver for Autodesk HumanIK 4.5 or 2012 middleware, as well as new tools for virtual moviemaking

Friday, March 4, 2011

How to Force Outlook PST files to another location

By default Outlook saves PST files in this folder %localappdata%\Microsoft\Outlook\ when running Vista or Windows 7 (%appdata%\Microsoft\Outlook\ for Windows XP).

When it comes to Hotmail and Gmail there is no way from within Outlook to relocate the PST files.

If you for some reason want to move these files Outlook will just recreate them and start downloading your emails again.

But there is a registry hack to force the PST Path. This can either be done before you add the account to Outlook or if you need to move existing PST files. In the later case you need to move the PST files from the default location to the new location as well.

Close Outlook and Locate Outlook in the registry (regedit.exe).

Outlook 2003: HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\

Outlook 2007: HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\

Outlook 2010: HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\

Then create a new Expandable String Value named ForcePSTPath and as value enter the path where you want the PST files to be.

Now start Outlook and the new path should be used.

Wednesday, March 2, 2011

Style the Ribbon

The Building Coder shows some fun coding trix to put color and style to the Ribbon in AutoCAD and Revit.

Using the AdWindows.dll assembly, we can access the ribbon control like this:

using Autodesk.Windows;

RibbonControl ribbon = ComponentManager.Ribbon;

As seen below the panel background image, panel headers, tab header font and more can be changed.

Wednesday, February 23, 2011

SSMPropEditor 4.2 released

SSMPropEditor version 4.2 is now available with more features to automate AutoCAD Sheet Sheet Manager.

Here are the news:

  • Added more abilities to control the paths to sheets. This affects renaming of sheet paths and also makes it possible to correct performance issues due to non existing paths. This is activated with the new Added Options>”Show found path” and “Advanced: Show internal paths”.
  • Improved the tree view control that lists the sheets so it retains selection after applying changes.
  • A no-installer download is also available making possible to run SSMPropEditor without the need run any installation in the first place. Great for the thumb drive or portable drive or network location.
  • Several bug fixes.

Update and correct non-existing paths to improve performance of AutoCAD SSM.

Here is what a user just emailed: “The new feature where you can change the pathing for the drawings has already saved us.”

SSMPropEditor makes it possible to select one, many or all sheets in a sheet set and update all properties at once, something that cannot be done with the Sheet Set Manager. Even if the revisions are different they can easily be incremented automatically to the next revision number or the Sheet numbers can be renumbered as well.

Contact us to get a time limited license file for free or purchase with a price per license of only 25 EUR or less depending on the total number of licenses purchased.

SSMPropEditor paid for itself on its first use

Slow Sheet Set Manager solution

More about SSMPropEditor including downloads.

Existing customers are entitled to this upgrade at no extra fee. Just install the new version.

Friday, February 11, 2011

Internet Explorer 9 RC

Today I downloaded IE9 RC and also the new Adobe Flash Player 10.2 and found that the problems with Windows Live Writer 2011 now are fixed. After some initial tests I have not run into any issues and hope it stays that way. Update: see issues found at the bottom. Not as stable as I first hoped.

I can see that the performance in the IE9 RC has been improved further than earlier beta and IE9 is much quicker than IE8.

One nice addition I like in the RC is the ability to show tabs on a separate row . Just right click on a tab.

I like the ability to close a tab with one click without having to activate it first and also the ability to drag tabs to a separate Window or to snap them using Aero Snap.

Where is the RSS icon? You need to show the Command bar. Right-click on the empty space to the right of the New Tab button or other places on the top frame.

One small annoyance is that the colors used for groups are totally random and even though a group is created from the same page over and over again there is a new color each time. I had the third tab active and opened a new tab using Ctrl click on a link and got one color (see tab 3 and 4).

I then closed this new tab and did the same thing again and got another color (yellow).

The only way I found to avoid this is to disable tab groups completely. I wish the color choice was more consistent and in the example above that the color was the same. I can also imagine others wanting to decide what colors or color scheme to use.

After some further usage I do see some performance issues when quickly navigating sites. It still is not possible to click on say 5-10 links holding down Ctrl. There is also problem when Ctrl click to open a new tab and right after that trying to click on another tab that is open.

After some more usage I have run into IE9 RC hanging completely on a few pages (here is one sample if you want to try) that works fine in other Browsers and also crashing while searching for text on a page. Quite often I also find that there are iexplorer processes that are not closed and sometimes takes a lot of CPU having to kill them via Task Manager. This still apply to the RTM version 9.0.8112.16421.

Autodesk Discussion Groups need Compatibility View enabled to be able to post even with the released version of IE9.

More at WLW 2011 beta and IE9 beta test and Internet Explorer 9 beta test drive as well as on the IE blog.

Monday, February 7, 2011

Error 1001. The specified service has been marked for deletion

I’ve created an installer using a Visual Studio 2008 deployment project where I install and uninstall a Windows service using a custom action and run into this problem when reinstalling the program.

Error 1001. The specified service has been marked for deletion

Installation Incomplete: The installer interrupted before JTB FlexReport Core could be installed. You need to restart the installer to try again. Click "Close" to exit.

Restarting Windows helps but I wanted to avoid that.

I tried to use sc delete but that didn’t work. I found a tip that services.msc should be closed but I did not have it running. I tried to manually tweak the registry HKLM\SYSTEM\CurrentControlSet\Services but it did not help either.

It took a while to identify the problem but the solution was easy. Close or exit from Sysinternals Process Explorer and run the setup again. For some reason Process Explorer is locking the service process and causing this problem.

Friday, January 28, 2011

Notepad2 tips to find and replace newlines

If you want to search in a textfile for newline (aka line break or end-of-line (EOL) character) here are some tips when using Notepad2.

Newline is typically defined with a character set of either LF (Line feed, '\n', 0x0A, 10 in decimal) or CR (Carriage return, '\r', 0x0D, 13 in decimal) individually, or CR followed by LF (CR+LF, '\r\n', 0x0D 0x0A).

This from from the Notepad2 FAQ:

Can I do multiline find and replace?
This is possible when activating the Transform backslashes option in the find and replace dialog boxes. Enter \n to represent the LF character, or \r for the CR. If line ending mode is set to Windows (CR+LF), \r\n has to be used to represent newline sequences.

To perform a replacement operation with multiline text as the replacement, it's easier to copy the text to the clipboard first, and then use ^c as a placeholder for the clipboard contents in the replacement field.

Here is an example where I add extra newlines by searching for \n and replace with \n\n.

Here is the result of it. Note that Transform backslashes must be checked.

Another thing that can be useful is how to handle tab characters.

If you activate Regular expression search in the find and replace dialog boxes, the \t sequence represents a tab character both in the find and in the replace text.

Tuesday, January 25, 2011

Bootstrap Your AutoCAD Deployments

Here is a tip on January/February 2011 issue of AUGIWorld.

R. Robert Bell has done a great work with the “Bootstrap Your AutoCAD Deployments” article and shows an example on how the profiles.lsp can be put to use.

"Bootstrapping AutoCAD from the secondary installer removes a great deal of the complexity in deploying AutoCAD. The addition of a single file to the deployment package can make deploying AutoCAD to users a seamless experience. When the bootstrap is combined with locating the user’s customizations on the network the user no longer suffers as large a productivity hit when he or she uses new hardware. The bootstrap also makes the CAD Manager’s and IT staff’s life much easier because the complexity of dealing with the secondary installer has been mitigated. The bootstrap should make it easier to roll out new versions of AutoCAD in a timely manner because less time needs to be spent configuring a deployment approach.”

Thursday, January 20, 2011

ADDSELECTED command update

If you run into this problem using Add Selected on leaders in AutoCAD 2011 or verticals there is a solution available.

You run the ADDSELECTED command and select an existing leader object to create a new leader.  After picking the first two points, you press "Enter" and AutoCAD begins continuously prompting for the next line of text, forcing you to use Task Manager to kill the AutoCAD process.

For the solution see KB: TS16158933

With the ADDSELECTED command, you can create a new object with the same object type as a selected object. It is also possible extending ADDSELECTED to support custom objects by editing the AcSelCmdMap.xml file.

Tuesday, January 4, 2011

getkword initget and default in AutoCAD’s AutoLISP

Looking in AutoCAD’s AutoLISP Reference there are examples like this:

(initget "Abc Def _Ghi Jkl")
(getkword "\nEnter an option (Abc/Def): ")

(initget 1 "Yes No")
(setq x (getkword "Are you sure? (Yes or No) "))

First off both examples should be updated to follow how command prompts are looking in AutoCAD like in the COPY command:

Specify base point or [Displacement/mOde] <Displacement>:

That means the examples would look like this when using:

(getkword "\nEnter an option [Abc/Def]: ")

(setq x (getkword "Are you sure? [Yes/No]: "))

Now to default. How is it achieved? Default should happen when you press Enter and thus initget 1 cannot be used because bit 0 set to 1 “Prevents the user from responding to the request by entering only ENTER”.

The documentation says on the return values of getkword: “A string representing the keyword entered by the user; otherwise nil, if the user presses ENTER without typing a keyword. The function also returns nil if it was not preceded by a call to initget to establish one or more keywords.”

The trick is then to check for if getkword is nil using (not kw).

So finally here is a sample solution of how get default:

(initget "Yes No")
(setq kw (getkword "Are you sure? [Yes/No] <Yes>: "))
(cond 
  ((or (not kw) (= "Yes" kw)) (alert "YES")) 
  ((= "No" kw) (alert "NO")) 
)

And here is the result and as you can see Yes is the default:

This can also be used with other get*** functions like getdist, getint, getorient, getpoint, getreal and getstring

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.