Choosing BricsCAD licenses

Choosing BricsCAD licenses

Knowledge is required to choose a BricsCAD license form. The following PDF document can be used as a reference. Download: Choosing a BricsCAD license form, 2019

If questions arise, please contact us.

Choosing BricsCAD licenses

Preface

Software licenses always raise a lot of questions:

  • What are the possibilities?
  • What is the most interesting option for us?
  • Are there disadvantages not mentioned?

So-called subscription licenses prove good for developers’ profits but are not always pleasant for the customer. And when is a somewhat more expensive network license profitable? With many developers the choice is limited, so you are pushed in one direction. In the case of BricsCAD you are free to choose and you can always switch from one contract form to another.

Subscription

The problem with subscription with Autodesk is not only the price but also that you can no longer use older licenses. The latter is sometimes difficult if newer AutoCAD versions do not support older customization and moreover, recent versions are downright slow. Workflow at companies is endangered and additional costs arise to resolve that. This is also an important reason to consider whether you want to continue on the current path or whether you want to take a new road with another party.

The biggest problem with Autodesk subscription is that the choice is limited between subscription and … subscription! In other words: You are stuck and you are completely dependent on the supplier (vendor lock-in1). One of the strengths of BricsCAD is that it has multiple license types so you can always choose.

License types

Strictly speaking, a license is a user agreement. The license types at a glance, we assume BricsCAD v19:

  • “Single/Volume”, standard license, also called “Node Locked”. A “perpetual license” – you purchase the usage right once and, as long as the operating system supports the CAD program, you can continue to use it. You can also purchase updates separately.
  • “All-in maintenance license”, you purchase the “Single / Volume” usage right plus the update for the next version only once, after which you pay annual update costs. This resembles subscription but has to compete with other licensing forms and is therefore often a cost-effective no-frills solution.
  • “Yearly subscription”, you rent an annual version (rental). This is similar to the Autodesk model, with the big difference that you can always choose a different construction. So you are not stuck. This option is interesting for when you temporarily need extra licenses for a project, for example. Unlike the other licensing forms, you cannot cut back on this, not paying means not being able to use the software.
  • “Network license”, also called “Floating License”. A construction whereby the program can be installed freely on all computers, but the total number of users using BricsCAD at the same time is limited. A license server must be installed on the network2. It goes without saying that it is useful to properly index work habits and occupations of computers and to compare this against the additional costs and additional system management.
  • “Specials”, “Academic license”, These types of variants are not taken into consideration here. Individual agreements can be made for commercial education. For example, an “All-in maintenance license” can be purchased that is provided with multiple license keys.

The products

Someone who is drafting 4 hours a week will first investigate whether “Classic” is a suitable option. A mechanical engineer who constructs full-time will soon develop a preference for BricsCAD Mechanical, supplemented with Communicator.

It is advisable to make an informed choice when choosing one of the Bricsys products. However, switching between products is possible without a complete loss of investment.

In principle, all license types are available for all products:

  • BricsCAD Classic
  • BricsCAD Pro
  • BricsCAD Platinum
  • BricsCAD BIM
  • BricsCAD Mechanical
  • Communicator

The basic product is “Single/Volume”, the bare product with a standard license. Translated to the most useful constructions:

  • “Single/Volume”
  • “Single/Volume” + “All-in maintenance”
  • “Single/Volume” + “All-in maintenance” + “Network license”
  • “Yearly subscription”
  • “Yearly subscription” + “Network license”

Shopping

Shopping to negotiate a lower price makes little sense, the prices are fixed prices. You will therefore not find any differences between dealers themselves and Bricsys, not even on an international level.

However, a dealer will always be willing to convert part of his margin into added value for a customer. Speaking for ourselves, this may include additional support, training, etc., depending on the sales amount. A good relationship between us and you is an important aspect, with mutual interests. Buying directly from a dealer is therefore the advice.

Costs based on current prices

The last dimes are less interesting and moreover this is a moment in time. For that reason we limit ourselves to 2019 and use percentages.

Choose your product, take the “Single/Volume” price as the basis, as 100%.

The “Single/Volume” prices:

BricsCAD Classic

€ 585

BricsCAD Pro

€ 800

BricsCAD Platinum

€ 1 135

BricsCAD BIM

€ 1 750

BricsCAD Mechanical

€ 1 650

BricsCAD Ultimate

€ 1 935

Communicator

€ 500

This graph shows the total license costs divided over the years of use. The license costs are indicated as a percentage of the initial “Single / Volume” price of a product.

As an example, BricsCAD Platinum “Single” costs 1135 euros. A choice for “Single / Volume + All-in maintenance license” (orange) means that the average costs over the first 5 years are 50% of 1135, so 570 euros per year.

Some conclusions:

  • “Single/Volume”, a basic license (blue) and not upgrading, is, as expected, the cheapest solution in the long term – but often not the most sensible. You could do this and then do an update with “All-in maintanance”. You could also do this as an alternative to “Yearly” if, for example, a project takes a little longer than two years.
  • “Single/Volume” + “All-in maintenance” (orange) is interesting for many organizations because the pace of development at Bricsys is high and there is a good response to market wishes. Bricsys itself also tries to put this variant on the market as a good alternative. This is a long-term approach.
  • “Single/Volume” + “All-in maintenance” + “Network license” (yellow) is interesting in places where people are not working full-time on CAD. This is actually only interesting within larger organizations.
  • “Yearly subscription” (+ “Network license”, green and purple) is interesting for limiting investments. See also the graph with comments below.

Tip: “Single/Volume” can be copied once extra for the laptop at home.

Crystal ball

The price data is anything but stable. In a sense, the CAD market is a saturated oligopoly. As a result, companies do not pay in line with the market. Newcomers have virtually no chance to penetrate that market. As a breath of fresh air, Bricsys appears to be an exception to that rule.

To generate a sufficient development budget, Bricsys needs market share. You can carefully conclude from this that prices will remain considerably lower for many years than those of established competitors. In other words: Increasing the market share from, for example, 1% to 2% results in a doubling of budgets, while doubling takes 5 years if the price increases by 15% each year.

It is likely that Bricsys will continue to raise prices for the time being. Then the question arises what the consequences are. For this reason, the following scenario has been worked out, with an annual price increase of 8% being applied. This is a more or less random assumption.

The picture then looks like this. Suppose you are going to use BricsCAD Mechanical for 5 years, Single + All-in (orange), then the average price per year is 55% of 1650 euros, which means 908 euros on average per year.

  • So if a program is purchased for a maximum of two years then “Yearly” is interesting.
  • For more than two years “Single / Volume” is interesting with the remark that an upgrade after 3 versions almost corresponds to the purchase of new. Moreover, new developments are not available and support is somewhat more limited.
  • In the long term, variants with “All-in Maintenance” will be the most interesting for many organizations. You would like to maintain a choice for a CAD platform for many years.
  • Bricsys will influence this picture in the coming years. For now it seems no coincidence that prices for “Yearly” and “All-in” converge (purple with yellow and orange with green, between years 7 and 8). The trend is “license-hopping” (with “Yearly Licenses”). In other words: Another CAD program tomorrow. “All-in-users” are therefore more valuable for Bricsys, but you can only see that back between 7 and 8 years. With Solidworks3, for example, this tipping point is around 3 years old.

In perspective

This story is about costs and choice of licensing forms of BricsCAD. If the products are compared with other packages, it is clearly visible where the differences are:

Some remarks are desirable:

  • About the packages:

    • BricsCAD Classic is the alternative to LT.

    • BricsCAD Pro is the alternative to AutoCAD plain.

    • BIM is the alternative to the Revit and AutoCAD combo.

    • Mechanical can be measured with Inventor and SolidWorks.

  • The graph shows very well the consequences of the price increases of recent years, the oligopoly of the big ones. And these turnovers go to a large extent to shareholders where at Bricsys the turnovers go to product development to a large extent. Many organizations are concerned about the development of price increases for “subscription”.

  • The wishes of CAD users are the key. If they discover that Bricsys products are faster, better, made with a vision for the future, with updates that add surprisingly useful functionality every time, then switching to BricsCAD is extremely obvious. And with a wide range of license forms, a good construction is always possible.

If you have any questions, you can of course contact us.

Paste on the command line, a font with visible spaces

Paste on the command line, a font with visible spaces

For BricsCAD and AutoCAD, the use of the space bar corresponds to the Enter key. Why would you want to use a font where spaces are clearly visible? To see what you are going to paste on the command line of your CAD program of course!

The principle

You can type a number of commands in a word processor and then copy and paste them on the command line.

The challenge is to ensure that everything is correctly selected during copying – near spaces at the end you have to be careful, because every space is an enter.

An paste example where each underscore is a space:

  • A circle with a radius of 1: circle_0,0_1_
  • A line from 0,0 to 1,1: line_0,0_1,1__

Note that there are two spaces at the end of the last example.

A font with visible spaces

How nice would it be if there were a font with visible spaces?

I searched and did not find it.

So let’s make it! Fontforge is heated up and character 0020 (space) will be hit by the forging hammer. The default font is FreeMono. During editing, the capital S and P are placed together as SP and then scaled to 35%, after the anchor points have been removed. Then a TTF was created with the name FreeMonoSp.ttf

FreeMonoSp.ttf is here: http://media.nedcad.nl/support/

Create a style in LibreOffice. And it works!

This way a problem has been solved in a very nice way. However …

The minuses

However, many people are not used to receiving LibreOffice documents. And they also have to install the font with the spaces. One more reason to get started with this package!

Everything looks very good in PDF. But copying does not work well. Almost all PDF readers see extra spaces after a text as an error and thus delete the spaces! A big bug that you can not work around.

So you have to think every time: copy the text, paste the text and do not forget to add the unselected spaces.

Yet useful!

Despite the minuses, this font clearly shows exactly what needs to be pasted on the command line. This makes this font a great addition to the documentation of CAD programs such as BricsCAD.

Addendum

The license is inherited from FreeFont and is GPL. See https://github.com/opensourcedesign/fonts/blob/master/gnu-freefont_freemono/COPYING

Apparently there are more applications for fonts with visible spaces, such as log-in screens of computers.

NedCAD’s expertise: processing 16,000 CAD drawings within one week

NedCAD’s expertise: processing 16,000 CAD drawings within one week

From our client IFE Tebel Technologies, part of Knorr Bremse, we recently got the question whether we could quickly convert 16,000 CAD drawings to PDF, PNG, TIFF. A spreadsheet with all information about the drawings – such as revisions, scale and paper format – was required.

Previous attempts by other parties with various utilities did not produce the desired result.

The background to this story is that IFE Tebel Technologies wants to store its CAD drawings centrally in the document management system of Knorr Bremse in Austria. For distribution and easy readability, all CAD drawings that had ever been made had to be converted to a specific PDF format.

In order to carry out this task properly, NedCAD has deployed a computer grid with CAD-optimized hardware and software.

By using LISP and BASH scripts in Linux, the 16,000 CAD drawings could be prepared and exported in a number of batches. By first checking all drawings for errors and imperfections, and immediately solving them, the next steps were a matter of sufficient computing power.

Trivia:

  • BricsCAD v18.2 was able to process 2000 drawings per processor per hour.
  • The sizes of bitmaps of drawings increased up to 140 Mpixel.
  • For many tens of thousands of cycles of opening, editing, and saving, BricsCAD has not crashed once.

Interested in what NedCAD can do for you in this area? For more information contact us, without obligations.

LibreOffice Writer Template Changing

LibreOffice Writer Template Changing


Internally, LibreOffice Writer has been used for technical documentation for many years:

  • Writer is very strong in combination with style sheets and
  • SVG format is perfectly supported. Vector-based images can therefore be inserted very well.

When you work with large documents, there are two annoying peculiarities you should be aware of.

  • The first is that the program stops organizing pages when the document becomes large. This can be overcome in an ugly way. Just add more trees, by always embedding images as a character. It concerns this bug. If you deal with this the right way, then Writer has no problem with documents containing hundreds of pages.
  • The other one is that it is not possible to link templates to documents. This sounds a bit crazy and yes, it may be considered to be a bug.

An extension “Template Changer” was available for linking template files. However, it does not work with new versions. That is why we created a BASH script as a tool to solve this. It has been tested on Linux but should also work with Cygwin on Windows. OS-X should work with minor changes, like the date function in Unix does not require an @ sign.

The underlying idea is that you have documentation projects where both the documents and the templates are in the same directory. If that is the case with you, then this script can help you. The script is a txt file, put it in your documentation directory, rename it to cht.sh and give it execute rights.

Download link: cht , we hope you like it!

Update 2018-11-19: Now both ODT and ODM files are supported.

Acquisition of Bricsys by Hexagon ppm

Acquisition of Bricsys by Hexagon ppm

A day after the BricsCAD conference in London, it still dizzies. There are loads of radical innovations and improvements to mention. Then there is the news that Bricsys has been taken over by Hexagon ppm. What are the consequences?

Bricsys is a model of our rapidly changing world. A little over a year ago we wrote a widely read article entitled “AutoCAD? Or just BricsCAD?” That article now feels like being outdated and no longer relevant. BricsCAD has technologically passed that station at a high speed. Where is BricsCAD now?

  • Alternative for Revit when it comes to BIM
  • Alternative for SolidWorks and Inventor when it comes to mechanical engineering
  • Alternative for AutoCAD

This makes it immediately clear that you can do everything in one program with one storage format (DWG). This works better, faster and with the efficiency of one environment. It also means a significant cost saving on education and licenses. Finally, this guarantees the quality and compatibility of valuable CAD files. These are not exactly the standard arguments for buying a software package and it is good to think about it.

Obviously, the acquisition by Hexagon ppm raises questions. Hexagon ppm is very close to the industry with specialist products that fill niches. From this point of departure, it is conceivable that BricsCAD as a CAD platform forms a valuable basis for building many solutions. In fact, people are already working on that. For example, the CADWorx Plant Design Suite was made suitable for BricsCAD last year. Hexagon ppm is therefore no longer dependent on Autodesk and it also works faster and more stable.

Then there is a concern what Hexagon ppm does to the Bricsys team. This team functions under the enthusiastic founder Erik de Keyser as a well-oiled entity. The emphasis here is on the team in Ghent for the general features of the whole and the team in Novosibirsk for the translation of difficult wishes into mathematical approaches and ultimately the code. It is a fragile whole with extremely good performances. It can be assumed that Hexagon understands what “do not change a winning team” means.

What does it all mean for market share? BricsCAD is a small player that has shown significant growth every year. However, it is realistic to say that a substantial market share would take many years to come. Hexagon ppm offers an environment to significantly shorten that path. That leaves no room for short-sighted money-rake constructions for shareholders as Autodesk uses with mandatory subscriptions. In order to achieve this rapid growth, it is also not obvious that prices will rise sharply.

PS After writing this, an interview with Erik de Keyser and Rick Allen was published and more or less confirms this vision. The interview can be found here.

Software Adoption in the CAD World

Implementing software is actually nothing more than ensuring that the software works well within your organization. Training, tuning, acceptance by users and more. Software adoption is often mentioned in the same breath as implementation but that is not correct, there are clear differences, if you want to see them…

Adoption can be, must be, taken in the literal sense. Adoption means that you make a choice for the long term, that you choose a file format for the storage of valuable CAD documents, that you knowingly make a choice for a product that others may not be able to deal with – or the opposite.

For many software developers, the file format is a tool to lock you in. Do you have package A once? Then you do not quickly transfer to package B, because B does not read your existing A-drawings 100%. Everyone who works with CAD immediately recognizes this problem.

The merit of the Open Design Alliance is that the closed .dwg format of AutoCAD is now “open”. This also applies to the .dgn format. How many dwg drawings are roaming around the world? Although AutoCAD is technologically outdated for many applications, it appears that the dwg format is still used extensively.

With the dwg specification known, new possibilities arise. Object types such as “line” and “text” are nice, but why should we not add complex object types such as “flange” or “wall”? Bricsys understood the value of this format very well and that is exactly what they did with BIM and Sheet Metal.

Adoption was the subject, suppose you adopt Revit alongside AutoCAD. Then you have a problem. Both products are from Autodesk but the data is not easily exchangeable. With BricsCAD that is not a problem, in fact, everything is in dwg format, so there is simply no need to exchange anything at all. There are many companies that use AutoCAD and Revit side by side. Bricsys is brilliant by betting 200% on .dwg.

You better understand our slogan now: “Explore the power of DWG!”

I am an opponent of the use of brand names. I do not have a TomTom but a navigation system, I never Google but I use a search engine (https://duckduckgo.com/ is actually quite refreshing where Google fails). In the meantime, we are looking for a Revit draftsman for our company and not a BIM-draftsman. That is unfortunate, because you exclude talented employees. What is also unfortunate is that this is the current practice. A BIM draftsman publishes in ifc format and that is interchangeable with Revit, BricsCAD-BIM and many other BIM programs. Well, just forget it for now, that will take a few years. But it is an important consideration that belongs to adoption. Adoption is longterm thinking. The Danish government has made the ifc format mandatory within the government and that is a start. Revit developers will have to go along at some point if they want to keep existing users. It is more certain that Bricsys is fully committed to .ifc, today. BIM can only succeed in the near future if information is interchangeable and all parties involved realize that very well. In the Netherlands too, people realize this and that is what the “BIM-loket” stands for: “Open BIM standards are essential to the successful widespread implementation of BIM within the Dutch building industry.”

Of course, the product must be good, of excellent quality. However, what does the future bring? How much confidence do you have in the software developer? It makes sense to make a future forecast based on past results. Look at the release notes of the last 4 years, what has changed? Is it only eye-candy? Are they developments that really affect your productivity?

In addition, you try to estimate what kind of company is behind the product. Autodesk has let its flagship run aground and fully exploited the users. These are considerable negatives. But with Revit they seem to do better. Other listed developers can be sketched in the same breath as “steadily moving forward”, for example Dassault Systèmes (SolidWorks, CATIA). As a limited company, Bricsys deviates from this, shareholders are directly involved and it feels much more like family, where people are listened to. Trust in the producer is perhaps the most important criterion when adopting software.

LISP and Variables

LISP and variables

There is often confusion about using variables. We are not talking about what they are and how they are described in the manuals, that is clear, otherwise search the net for “cad lisp variables”. What is less clear is how variables propagate between drawings and CAD sessions and even installations. So lets shine a light.

Brief on naming

With so many code on the net there are so many styles. That is why it is useful to read this first. A recognisable style makes reading code so much easier.

CAD LISP is what is used in BricsCAD or AutoCAD ( named AutoLISP and Visual LISP). CAD LISP is not used like, for example, Common LISP. You may find “Naming conventions” at http://www.cliki.net/Naming+conventions helpful but also overkill for CAD LISP.

Many examples use CamelCase or mixedCase names like MyVar or myVar. This can lead to less easy to track errors in a case sensitive environment, but is is probably the easiest way to type.

An alternative is suggested in the previous LISP link: my-var. Double clicking on my-var in your editor often does not select the word, but only my or var. That can be a valid excuse to use underscores in some cases: my_var. For example, in Notepad++ (NPP), double clicking a variable highlights all variables with that name – a valuable feature. On the other hand, adding -_:* as delimiter is useful, see Settings > Preferences > Delimiter > add -_:* characters without spaces.

A habit is also to use asterisks for global variables: *my-var*. But it is just a recommendation. Adding an asterisk itself does not make it global, it is just a naming convention, please read the rest to understand this.

All in all: Do what you want. You may tend to follow the LISP naming conventions, as-i-do. Short variables are common too, like dx, dy, ss1 (selection set 1), but here variable ll does not ring one bell while list_length keeps code readable.

Another LISP variant seen often is package:variable. This helps reducing collision chances. Some authors on the net use it like authorinitials:variablename. You could use it for your “Nuts” program like nuts:var1. As an escape for word selection: nuts_var1 or nutsvar1 or nuts-var1. But, if you think about it, limitations of word selection are welcome in this case: Use nuts:size-list and be able to highlight all “size-list” OR all “nuts” occurrences. On the other hand, adding “:” as NPP Delimiter works fine too and is, for what it is worth, my personal favourite. That is because when I double click on a variable, I instantly see all other occurrences of that variable.

One last remark, variable names are called “symbols”. So get used to people talking about “symbols”, “symbol values” and “symbol names” in order to understand what they talk about. A symbol is a representation of a variable like a list, function, object, value. Atoms are values that can not be divided, like symbol names, symbol values and not (non empty) lists. You may consider string “foo bar” as one atom because (atom "foo bar") returns T, but (read "foo bar") returns atom "foo", because (read ...) considers the string to be a list. Summarized: An atom is the value of every symbol that is not a list.

Local and global

There are local and global variables. Lets paste some code fragments on the CAD command line:

(setq existingvar "existingvar")

… and paste:

(defun test (/ localvar existingvar) (setq localvar "localvar") (setq globalvar "globalvar") (setq existingvar localvar) (princ (strcat "local, global and existing are now: " localvar " - " globalvar " - " existingvar)) (princ))

After pasting, don’t make the mistake that you think  globalvar is available, doing  !globalvar on the command line returns nil. Loading a function in memory (defun...) and executing it are two different things. So we do execute it by entering (test).

The function returns exactly what we expected:

local, global and existing are now: localvar - globalvar - localvar.

Do the next on the command line:

!globalvar returns "globalvar", where !localvar returns nil, meaning !localvar simply does not exist (anymore). However, !existingvar returns "existingvar", and that may surprise you.

Summarized: Local variable values evaporate after a function (defun ...) is finished. However, when a local variable existed prior to running that function, it gets the old value back. Beautiful!

Names spaces

Each drawing has a created “name space”. That is where the global variables lives. So a global variable can have different settings in each drawing. This is an important thing to remember because it can be confusing.

Repeated in other words, each name space – and as a consequence each drawing – has its own variables. A global variable or a function name (defun function-name ...) in one document can be different or absent in another document.

Managing global variables with the same symbol name

We want access to variables for all drawings with their own name spaces – or not. What are the tools? How does it work?

  • When you load a drawing and you use acaddoc.lsp for AutoCAD or on_doc_load.lsp for BricsCAD, you can make a copy of that global variable (setq ...) in each drawing’s namespace.
    • When you use Autodesk autoloader (don’t if possible), you can do the same in file PackageContents.xml:
      <?xml version="1.0" encoding="utf-8"?>
      <ApplicationPackage
        <Components>
        <ComponentEntry
          ModuleName="./contents/load_for_each_dwg.lsp"
          PerDocument="True" />
        </Components>
      </ApplicationPackage>
    • As a tool to make life easier for programmers and to work around Autodesk autoloader, NedCAD developed CADchUP ACME. With ACME you can mark LISP files with variable definitions to load on document load or on program start.
  • When you use strings you can use (setenv ...) and (getenv ...) and write to and read from the registry. Very handy but there is one thing you must keep in mind:
    • This mechanism is limited to strings. This means you often have to do conversions.
    •  (getenv ...) reads not only the registry, but also the operating system’s environment (do SET or ENV in a shell to see them), like  (getenv "username"). As long as you don’t use  (setenv ...) nothing happens. But if you do, the value is written to the CAD registry part and the next time you do getenv, you will get that value and not the OS value.
    • Another way for poking around in Windows registry: (vl-registry-write ...) and (vl-registry-read ...). Also limited to strings. Permanent available.
  • Put your variables in a file and remember, you are using LISP: write and read lists when possible. It is easier to retrieve the 13th member from a list (nth 12 ...)  on one line of a file than to read line 13 from a file (while ... (read-line ... )) with counters and performing string conversions.
  • Probably the most practical and clean way: Use the black board name space. What you do with a file can also be done with (vl-bb-set ...) and (vl-bb-ref ...). Support is not limited to strings. They cease to exist after the CAD program is closed and don’t clutter the registry. If you use the black board, then *global-var* syntax is very distinguishing and attractive. Just publish the global variable once with (vl-bb-set '*global-var* global-var) at the end of your code and get it somewhere else with (vl-bb-ref '*global-var*)
  • If you use global variables in multiple drawings and they must all be updated, change the variable in one place and use (vl-propagate ... ) to update in all name spaces.

Variables, memory and nil

Variables use memory, but not much. It is good practise to free memory and kill variables to prevent collisions. Example: (setq test-val1 "Hi!") returns string “Hi!“, (setq test-val2 T) returns T (True, logical, not a string).

We want to get rid of variable test-val1 and the only thing we need to do is (setq test-val1 nil). That is it. Same for functions, for our function (defun function-name ...), you do  (setq function-name nil). That is the proper way and prevents collisions of multiple used names. Closing a drawing eliminates the name space and does the same.

A few words about (defun function-name (arg-1 ... / var-1 ...). When the function is finished, variable function-name persists, just as the variables not included after the slash. However, arg-1 is vanished after the function is finished – or gets its old value as explained above.

But what if a function returns nil like (not T)? It is the same: (setq test-val1 (not T)) simply destroys test-val1. An overwhelming list of used symbols can be retrieved by (atoms-family 1), you can check it yourself.

You can say that a variable, with a value of nil, can not have value nil because a variable evaluating to nil does not exist. Yes, read this twice. Now that is chicken egg stuff! Just a bit confusing so forget it, cheat ourselves a bit, and let’s live on with the idea that a variable can be nil.

That is it, in short.

Notepad++ syntax highlighting for CAD LISP

Update November 2018:

Bricsys developer Torsten Moses improved the LISP development environment BLADE in many aspects. It runs also on Scintilla, just as Notepad++. So if you’re using BricsCAD V19, you may consider using BLADE instead. Even if you code for AutoCAD, you may want to use BricsCAD with BLADE for that purpose, it is simply a way better tool set and combined with ACME autoloader you can switch from BricsCAD to AutoCAD and back. Then again, you can simply keep on using npp with this extension. Time for a comparison:

Task NPP+CAD_LISP BLADE
Selecting parts including opening and closing parenthesis cursor near ( or ) and Ctrl-Alt-B Ctrl-Shift-R
Selecting parts between parenthesis Ctrl+DLMB ?
Select a complete line, carriage return etc. included TLMB TLMB
Indent Select block and Tab or Shift-Tab Select block and Tab or Shift-Tab
Line duplicate Ctrl+D Alt-O
Line delete Ctrl-L Shift-Del
Commenting Ctrl-Q toggles comment / uncomment Comment Alt-L, Uncomment Alt-N

Notepad++, abbreviated npp, has a LISP template built-in. But LISP for CAD is quite different from LISP for “plain” programming.

Several templates for CAD circulate on the net, none made me 100% happy. So, after starting npp, it was time to choose “Language” -> “Define User Language”. It did not take much time to make something and I’m happy with it. This is the result:

I would like to share the XML file. You can download it and I hope it helps you. I also hope that some feedback can improve the file. See below.

But that is not all, a discussion here https://forum.bricsys.com/discussion/comment/33907 did lead to another version with all (!) commands build in. Special thanks to Torsten Moses for his contribution (and CADbloke for inspiring). Torsten’s extensive function list for UltraEdit was included.

If you use UltraEdit, visit https://www.bricsys.com/bricscad/help/en_US/CurVer/DevRef/index.html and choose “LISP” > “Support for UltraEdit Editor”.

Anyway, the result is a second download below and despite its size, you probably prefer this one.

Assumptions

A long program must be readable. Therefore, all comments have a light background colour. Just get used to it and notice that it works well. Toggle for comments: Ctrl-q. Because functions like (princ “information”) contribute to the readability of a program, strings have also a light background.

An exhibition of colours does not contribute to proper readability. On the other hand: differences between functions, variables and texts must be clear enough.

“Lost In Stupid Parenthesis”: Parenthesis should be very clear. Everyone forgets one now and then, but it should be very easy to find the ones that do not match. They are notably visible. Highlighting works well in npp and parenthesis turn red when the cursor is next to it. Ctrl-b and or Ctrl+DLMB to select a block is also very helpful.

LISP as used in BricsCAD is extremely compatible with AutoCAD. However, at Bricsys they are doing product development. So they have commands that do not work in AutoCAD. Those functions have the same colour but are – as a warning – italic. At Bricsys they try to solve that problem with “VLE functions”. These are native and fast functions in BricsCAD and Bricsys offers a variant in LISP written for AutoCAD. You can even distribute these functions with your app for AutoCAD. They are a bit slower then but that is in line with recent AutoCAD versions.

The function list was based on the AutoCAD function list for OS-X. But if you have an Apple and want to run CAD software and think about it, you’ll skip Autodesk and go to Bricsys. So I changed the function list and took AutoCAD 2016 as a base and added the BricsCAD V17 extra functions. All in all, this xml code now covers thousands of functions.

 

Installation and use

  •  Installing Notepad++:
  • Configuring:
    • General for CAD LISP:
      • Check word delimiters in “Settings” > “Preferences” > “Delimiter
        • At “Add your character…“, add these characters without (!) space:
          -_:* (In LISP you use these characters in variables, just DLMB on a var, see this post: http://nedcad.nl/en/lisp-and-variables/ )
        • While there, “Delimiter Selection Settings“:
          • Open“: (
          • Close“: )
          • Select “Allow on several lines“.
    • Get your CAD_LISP language package from this page.
      • Choose from the menu “Language” and “Define your language“.
        • Click on “Create New …” button and give the definition a name, for example “CAD_LISP“.
        • Now click on “Import …” and select the xml file.

Files for download

  • This is the simple light weight xml file for Notepad++: NedCAD_LISP.xml
  • You’ll probably prefer this file, containing all functions: CAD_LISP.xml

Example

Why all the work to put thousands of functions in this language file? A real world example gives a clue:

In a complex LISP file (many hundreds of lines) , some functions are defined: “primer”, “position”, “shapes”, and “varset”. They are called in a sequence:

In AutoCAD you will not notice anything. However, BricsCAD has a more modern and richer LISP environment and “position” is an internal function that is lacking in AutoCAD. Since functions are red and differing functions are in italics, you see a problem arise. Ask yourself, hoe would it be if all functions would appear similar? Exactly, crashes and seeking needles in haystacks.

Bonus

Some things to remember. You have a powerful editor configured, giving you the possibility to drive your efficiency to new heights. Take advantage of that:

  • Mark your code as CAD_LISP: Menu > Language > CAD_LISP
  • Selecting:
    • Parts including opening and closing parenthesis: put cursor right before or after ( or ) and Ctrl-Alt-b.
    • Parts between parenthesis: Ctrl+DLMB (double-click left mouse button).
    • A complete line, carriage return etc. included (for Ctrl-x, Del, …): TLMB (triple-click left mouse button).
  • Indent: Select block and Tab or Shift-Tab.
    • So aligning is a few times Shift-Tab and then Tab if needed.
  • Find and Replace with regex turned on:
    • Find something at start of line: ^Find Me or ^.FirstCharacter.
    • End of line: Find Me$.
    • End of lines -> Space: \r\n -> LiteralSpace
  • Remove empty lines: “Edit” > “Line operations” > …
  • Duplicate line: Ctrl-d
  • Delete lines: Ctrl-l
  • Comment lines as mentioned above: Ctrl-q

You can do more smart things…

I hope you like it, best regards,

Wiebe van der Worp

Comments? More than welcome!

Some additional comments:

  • quoted parts were green. For something like '(a,b) that is fine. However, when using function '(lambda () ...), a large range of parenthesis could be excluded from bracket matching. So this item has been disabled.