Consider this situation – you’re got a marking plan in front of you. You want to make sure that the ferrules in corner panels do not clash. How are you going to do that?
How would you solve the problem?
You’d have to find the corner panels, and then go to the appropriate drawing – both of them mind you – and you’d have to make sure that they are at different heights. That can get very tedious and it’s very time consuming, and more than likely, you’ll make some mistakes – because the panel elevations might not be adjacent to each other.
It’s not the easiest thing to see and compare in AutoCAD.
What is a better way to solve the problem?
But now you have a tool which allows you to easily compare the heights of the ferrules in two panels, straight from the marking plan.
There’s a lot of code and logic which goes with this. Perhaps I will outline it in another blog post.
For a very, very brief description of the overall route used, you can check out the code synopsis from my sister blog here. There I post the base class and interfaces used to derive the result – but have excluded all the implementation details.
Here is the video demonstration – and yet another example of the type of technologies and innovations you will have at your disposal if you work with us:
So I’ve just managed to run AcCoreConsole – some script. And it’s changed some settings. And now when I open regular AutoCAD, when I type in netload – it seems that I’ve lost the ability to open/select things using the user interface. Now I have to manually type out long file names into the command line which is the height of tedium.
Why did it happen?
It happened because we were not meticulous in the running of our AcCoreConsole scripts. We should be sure to ensure that we save settings properly so that when users use the regular AutoCAD program, they don’t have to reconfigure the entire environment away from what works well for AcCoreConsole, back to what they are normally used to.
How to fix the problem immediately
You can file the problem by typing in:
That should change those settings back to normal.
How to avoid the problem in your script file
Don’t forget to return it to the original settings: anything beginning in a semi-colon is a comment and will not be executed.
A commenter had some trouble loading the files. So perhaps the AcCoreConsole is confusing people. So here is a post which will hopefully clarify how to do it.
It’s quite simple:
Have the LISP file ready.
Load the lisp file
Call the command.
It works exactly the same as in AutoCAD – the UI version. But remember you cannot call any commands which make use of Windows forms or WPF. It is strictly command line only. So things like APPLOAD are not going to be very effective in the AcCoreConsole.
While writing the above AutoCAD plug-in, I faced a small conundrum in the below code:
The question for you is: will the transaction be disposed of, and committed given I have returned the bool before it reaches the end of the using statement?
Will it be disposed?
The short answer is yes. The transaction object implements IDisposable. So, finally you can trust that the transaction will be disposed, and that any objects that it opens will also be similarly disposed.
Will the transaction be committed?
I had a peak into the Dispose methods using Reflector. I didn’t see any automatic committing of any transactions – so I am venturing to say that no, the transaction will not be committed. In other words, we’ll have to restructure the above code to ensure that the transaction is committed before we issue the returning statement. Perhaps the AutoDesk team should abort a transaction if it is not committed before a transaction is disposed?
So the lesson is: (i) always be sure your transaction is being committed, and (ii) a using statement obviates the need to ensure that your transaction is actually being disposed of.
It’s a common problem apparently. There are far too many block references placed a little too close to those pesky shear lig points. It takes discipline, but when you have 5-10 people all working on the same drawing, with different practices, it’s something that’s really easy to miss, but really expensive to discover.
Ordering parts in precast panel projects is tricky. You need a BOM (Bill of Materials). You need to know what you need and how much. When there are thousands upon thousands of parts – that can be a very tricky endeavour.
Why should you bother counting inventory?
It all comes down to money. And how much of it you tie up in your inventory. And how quickly you’re gonna use it. Financial liquidity is like blood and oxygen. Without it, no organisation can survive. And you can maximise your liquidity (and profits too) if you manage your inventory well. You should be able to answer these questions:
How much inventory did you pay for?
How much inventory is in your shop?
How much did you use up in your projects?
How Tek1 solves inventory problems: Demo Video
We give you accurate numbers about what you’ve ordered. And what you need to order. This is how we come up with a Bill of Materials:
Suppose someone makes a change in the layout but forgets to do so in the shop drawing (and vice versa). If you move a cast in plate, and if it’s actually produced and taken to site, then you have a big problem, and a big cost. How are you going to identify the differences which exist in the thousands of panels that you make? What if you had a tool which allowed you to easily identify differences between the two drawings?
This is what this Panel Comparison tool does. It gives you confidence that somebody hasn’t made a boo-boo. And moreover, if somebody has made one, then this tool identifies sloppy shop drawing practices.
It can work for all clients with only very minor modifications. Very well abstracted out in the code.
It is super fast. Comparing the thousands of elements in each drawing takes a bit of computing power – but with smart algorithms, you can cut down the time.
It works for all sorts of edge cases – what if the panel was made up of arcs, polylines and straight lines – this plugin can handle all sorts of things. It can also handle voids in the panel?
What if an item is on the edge of a panel line – it can handle that was well.
Every single panel that we draw will go through the above practices. It should give you a lot of confidence that we’ll get the drawings right. Yet another tool in the Tek1 arsenal that allows this firm to lead the industry in Precast Panel drafting.
It’s not very often that I write something on the Autocad .net API, so here’s something which you, I suppose, will need one day:
If you want to compare two lines, with a tolerance, in a collection then you’d need a LineComparer. The MSDN guide says that one should inherit from EqualityComparer, so unquestioningly, I did their bidding. The results are as below.
Take careful note of the Hashcode. You want lines that are similar – and are within the tolerance to return the same hashcode. If they are outside the tolerance then the chances of two different lines returning the same hashcode is minimal.
Lines are equal if their start and ends points are equal (or vice versa). They are also more or less equal if they return the same hash code. In such cases, then the equals method is run.