CAD

Wiip Wormhole for Revit with support for Revit 2020

Wormhole for Revit 1.1.6797.30945 with support for Revit 2019 is available

Wiip Wormhole for Autodesk Revit

Wormhole, our free addin for Autodesk Revit is now available in a new version (1.1.6797.30945) with support for Revit 2019, 2018 and 2017.

Features includes:

Wormhole for Revit with 2018 support (version 0.5)

eInvalidLayer when setting LayerTableRecord.IsFrozen to false

Found this problem this morning: if you set IsFrozen to false on the current layer, you'll get an Autodesk.AutoCAD.Runtime.Exception with the ErrorStatus at eInvalidLayer. The setter is certainly checking if the layer is current to avoid freezing it, but it should test the value to ignore when it is false.

So you have to check the layer state before changing the property to false:

Etiquettes:

Revit tip: center a text on a point

Text as a group

In Revit, texts can only snap to other texts. It's strange, but it's Revit way ;-)

Etiquettes:

Revit: arrange windows horizontally

Wiip Wormhole for Autodesk Revit

This should be easy, but it's not possible with Revit standard tools. If there are two windows opened, you can only arrange them vertically. Yet it is handy when you want to display a schedule side by side with a graphical view.

Etiquettes:

Bring an entity to the foreground with VBA

VBA does not provide functions to change the draw order of an entity. However, we can use SendCommand for executing DRAWORDER:

Etiquettes:

Get the name of the active AutoCAD document with .NET

Here's a little sample code to detect if AutoCAD is running. If it does, it displays the full path of the active drawing.

The code use COM (out of process).

VB.NET

Imports System.Runtime.InteropServices

Module Module1

    Sub Main()
        Try
            Dim acad = Marshal.GetActiveObject("AutoCAD.Application")
            Dim activeDocument = acad.ActiveDocument
            MsgBox("Le chemin complet du document actif est : " & activeDocument.FullName)
        Catch ex As COMException
            Const MK_E_UNAVAILABLE As Integer = &H800401E3
            If ex.ErrorCode = MK_E_UNAVAILABLE Then
                MsgBox("AutoCAD n'est pas en cours d'exécution.")
            Else
                Throw
            End If
        End Try
    End Sub

End Module

Subscribe to RSS - CAD