Monday, 30 September 2013

Kill Visual Basic for Applications for Autocad 64 bit

Autodesk is trying for years to get people to start translating their vba to a language

Recently I was asked by a client to come and check their hardware because performance was bad. It turned out that a generic ICT provider had setup two machines for them. They asked me to optimize them and see whether I could make some improvements.

Since this were machines meant for Autocad I like to use the test from Cadalyst.

When I first ran the test on the machines it took 55 minutes on one machine. This surprised me quiet a bit because it wasn't bad hardware at all. I did notice that the machine seemed to hang on creating arrays. Eventually it completed the array. 

Next I update the driver to a certified driver. This gave some very interesting results. First the test completed now in 46 minutes. That's almost 20% performance improvement. That's very nice but of course I wanted to know where was this performance improvement realised. The interesting part is that the 2D performance suffered from the certified driver. The improvement for 3D was so much that it easily compensated for the 2D loss. All the 3D test were faster than without the driver but it differed from a minor 1,07% gain up to 36,59% faster. The 3D realistic visual style seems to benefit the most. Strangely enough you would think that one visual style would aways be faster than another. This is not the case it differs per drawing. After making a simpel ranking system it showed that Hidden lines is the fastest, next conceptual,than 3D wireframe and last Realistic.

The 2D test are interesting as well. Here I see performance changes from -39,19% to +52,82%. One drawing completely destroyed the chance for a decent score.

The scores for CPU also changed. That suprised me a bit because you would think that a videocard driver has nothing to do with the cpu. Every tested drawing gained performance from 1,89% up to 14,79%.

Again we see that the videocard driver also influences performance for Disk interaction. Here the results start from -18,18% up to +13,71% 

Although happy with the improved performance I wasn't quiet happy with the score. Looking around at the system I ran into VBA.... Suddenly a memory triggered my mind of another system 2 years ago that came to a complete standstill because of the vba enabler. I asked the people there what do you use it for? Do you have some legacy programs that need to run. Since they could think of one I de-installed the vba enabler.

After de-installing I ran the test again. Now the test completed in 17 minutes...
That's a nice 323% performance improvement. Therefore the title of this blog: Kill Visual Basic for Applications for Autocad 64 bit.

Sunday, 8 September 2013

Lines of overhead beams

Recently I was asked again about overhead lines. We want to see dashed lines from beams above our head on the floorplan we are looking at. It would be really great if beams and floor openings would get the same status / settings as caseworks. 

Since this is not the case we have to deal with this problem. A thought occurred to me, since this client uses a lot of links why not try and use a designated view to tackle this problem.

The setup: I have an architectural and a structural model. see image below

The architectural file has two thin floor slabs and the structural file has beams, columns and structural floors. The structural file is linked into the architectural file.
I want to get this in the architectural file. You see I have the view level 0 open and I see the beams from level 1 dashed and red. I specifically did not model any beams on level 0 to avoid showing the wrong thing)
In the image above you see what we want to see in the architectural file
Here you see the visibility and graphics tab of level 0 in the architectural file. Notice that it links to a view from the structural file. This view is specifically setup to only show beams and and it has the graphic overrides. It also has specific viewranges.... Unfortunately In the custom view I can only set the viewrange for linked view or host view. The host view will not work because those are a level to low. The linked view might not work because of viewdepth settings. Basically the architectural modeller has to ask the structural modeller to create specific views for him. In this case that's not really a problem. In other cooperative designs it might not be so easy to ask this. But with the 2014 release you could facilitate these views within a couple of minutes. 

So the structural modeller has to do the following:

  • create a view type for floorplans
  • create a viewtemplate for this view
  • let new views of this type link to this viewtemplate

and the last this he would have to do is create views for all requested levels.

The important thing I had to do to get this to work was to set the viewdepth deep enough. See image, this setting worked for this model.
In the architectural file I had to do this to get it to work:
  1. go to visibility and graphics
  2. go to tab Revit links
  3. click on the button by host view
  4. set the first tab to by linked view
  5. chose the linked view
If you want you could even override settings of the linked file again. Do so in the model tab if you need to. I know this method only works when you use linked files and it works better if the structural engineer is willing to help. Have fun and if you have a better way please don't hesitate to tell me.