Custom Inquire script for Tekla Structures

Tekla_Structures_Custom_Inquire_scritp_screencast

Small evolving of previous example. Here list of required atributes is set by text mask, elements is separated by semicolon, result pushed to table view. In this way it sems much more nice and useful for quick inquire model parts. And it works with all kind of model objects. Even model itself.

Macro could be downloaded from DOWNLOAD SCRIPT

How to manage with these you could find here

Any kind of notices or ideas are welcome in comments.

Continue reading “Custom Inquire script for Tekla Structures”

Number list of drawings in Tekla Structures Macro.

Sometimes required start-to-end numbering. Clear and consistent list of numbers for each drawing. There are many different ways to solve issue this kind. As for me, I prefer to use a small and useful script.

What we will do is to set for each selected drawing in drawings list a number, one by one these will get a straight list of numbers.

So first we have to get access to a list of selected drawings. Then move through each element, and add a number. Isn’t pretty simple it? Listing of script is also small and useful, so you could rearrange it for your needs.

namespace Tekla.Technology.Akit.UserScript
{
    using TSD = Tekla.Structures.Drawing;
    using System.Windows.Forms; //used for messageBox.show()
    
    public class Script
    {
        public static void Run(Tekla.Technology.Akit.IScript akit)
        {
		MessageBox.Show("Total number of drawings: " + CAD_NumberSelectedDrawings().ToString());
        }


      static int CAD_NumberSelectedDrawings()
        {
        
            int i = 0; //register number counter
            var CurrentDrawingHandler = new TSD.DrawingHandler(); // get current drawing handler
            var drawingsEnum = CurrentDrawingHandler.GetDrawingSelector().GetSelected(); //list of selected drawings
            while(drawingsEnum.MoveNext()) //going through it one by one
            {
                var _drawing = drawingsEnum.Current as TSD.Drawing;  //particular drawing
		i++;
		//and finally set number as "DRAWING.USERDEFINED.Page" UDA property.
		_drawing.SetUserProperty("Page", i.ToString()); //change "Page" to name of your UDA
            }
	return i;
        }
    }
}

Tekla Api how to work with Drawing List

If you need access to selected drawings in list of Tekla Drawings – next piece of code will be useful

 

{

var CurrentDrawingHandler = new TSD.DrawingHandler(); //Get handler - seems easy.

var drawingsEnum = CurrentDrawingHandler.GetDrawingSelector().GetSelected(); //Get a list of selected drawings

while(drawingsEnum.MoveNext()) //goest through that list
{
var _drawing = drawingsEnum.Current as TSD.Drawing;  //here is a particular drawing which we coudl work width
string some_string = string.Empty;
_drawing .GetUserProperty("Default", ref some_string );//let's do sometring, get some UDA for example.

MessageBox.Show(some_string ); //And show it
}
}

Tekla Web View with Bolts by TeklaAPI

Issue – Tekla BIM sight provided all information, but weight of each particular model is actually big (because it’s IFC file actually, see more).

However, Tekla provides also Tekla Web View application which using xml format to show 3d model – it’s 5-10 times smaller and works faster, but there is no way to export presentation of required bolts.

Tekla Web View with Bolts Included

After Playing with TeklaAPI and Tekla Web View xml format push me to update information of web view with related bolts.

Seems that this could be Cheapest and fastest way to share model with colleagues.

As well it could be used to freeze design.

 

What if architect goes mad, and change facade again and again? 

I Really like 2D array component for Tekla Structures, not only because it was done by me, but because from time to time it brings surprises. This pictures provided as conclusion after additional implementation in custom project. All geometry on these pictures done by 2D array component and default cutting component. Which means – all what you see is just two components. Bellow a little bit more interesting examples.

Continue reading “What if architect goes mad, and change facade again and again? “

Locked Objects Tekla

Tekla Structures There are locked objects, see report. The operation could not be performedFrom time to time you can get annoying messages says that some objects are locked. Of course, we got official documentation which explains this issue wide enough. And this article is either based on it. But actually, there is a bunch of cases which are not covered by documentation or mentioned not clear enough (from my point of view of course). So let’s go through object locking in Tekla Structures. And obtain some tools to deal with it easily.

 Locking objects

Locking is used to freeze parts of the model from unexpected changes. Such changes appear from time to time because of moving things which shouldn’t be moved or during mass changing properties and UDA. When you select a couple of hundreds of parts, there is a big chance to select something which you not wonder. Such accidentally changes affecting numbering, ruing drawings and reports. That’s why to freeze objects from change is a pretty cool idea. You could freeze your parts, and be sure that no one else modifies it without noticing.

Instead of other CAD application Tekla do not have layer system to froze (Phases doesn’t count). But prevention of changes is applicable for most of the model elements. All that you have to do is set UDA “OBJECT_LOCKED” to true.

Here is a list of things which may be locked:

  • project properties
  • phase properties
  • assemblies
  • parts (separately for beams, columns etc.)
  • bolts
  • welds
  • specific drawing types

Continue reading “Locked Objects Tekla”

Tekla Structures Hot Keys and shortcuts

If you already get used to work with Tekla Structures Application, and it’s became one of your main engineering tool, than it make sense to push your effectiveness further. Improve your performance and save a couple of minutes for coffee, tea, and chit chat with colleagues. One of the easiest and most powerful way to do that – is to use keybord shortcuts, or hot keys.

Shortcut could be set for almost any actions in model, or in drawings. All what you have to do is to find most beneficial operations, and arrange hot key map for your circumstances.

But before lets run through default hot keys, which is provided with tekla from a box.

Continue reading “Tekla Structures Hot Keys and shortcuts”

Tekla Custom Inquiry macro script

Tekla Structures custom inquire toolOne of the main advantages of Tekla Structure is ability to get full necessary info about any part of model in couple clicks. I really appreciate this thing but all default tools has some disadvantages.

For example default Inquire return complete info about selected Entity, but about only one item per time, and only after user request. Custom Inquire – from Tools menu – is mach more flexible, but also – only one item, and  there is no way to get UDA.

Organizer tool from the same menu – is pretty cool. But at the same time it’s pretty slow, and could freeze model for couple minutes.

Reports, is awesome, but not interactive at all and require special skills and time to get used to with Template Editor.

Let’s make our own custom Inquire, and it’s qute easy with C# and Tekla Open API.

In one of previous articles was provided Tekla API Envents example from Tekla OpenAPI reference. Why not to make macro based on this feature?

All what we have to do is:

  • Make a form
  • Sign this form on Tekla Event
  • Grab data from Tekla each time when event appears
  • Show it to user, in on a form
  • Pack all this thing in Tekla MacroScript

Simple, and this macro could be downloaded under cut: Continue reading “Tekla Custom Inquiry macro script”

7 Main Russian Oil&Gas projects in 2017

Despite its shaky economic performance over the past two years, Russia is pushing ahead with a wealth of multi-billion dollar oil and gas projects. Featuring pan-Baltic pipelines, enhanced oil and gas trading platforms, and massive transportation deals, Russia’s energy ambitions are not to be ignored.

Sometimes controversial, but always attention-commanding, here is a cross-section of Russian oil and gas projects to monitor in 2017.
Continue reading “7 Main Russian Oil&Gas projects in 2017”

Institutional memory and reverse smuggling

Originally from  http://wrttn.in/04af1a (not available)

Institutional memory comes in two forms: people and documentation. People remember how things work and why. Sometimes they write it down and store that information somewhere. Institutional amnesia works similarly. The people leave and the documents disappear, rot, or just become forgotten (as it were).

I worked for several decades at a large petrochemical company. In the early 1980s, we designed and built a plant that refines some hydrocarbon type stuff into other hydrocarbon type stuff. Over the next thirty years, institutional memory of this plant faded to a dim recollection. Oh, it still operates, and still makes money for the firm. Day to day maintenance is performed, and the skilled local crew is familiar with the controls, valves, safety systems, and other such. Continue reading “Institutional memory and reverse smuggling”