LazJS

LazJS - JavaScript for Revit

Frustrated with the limitations of Revit formula? Or spend hours writing a Revit plugin?
Spending hours updating your door tags?

What is LazJS?

LazJS implements JavaScript in Revit. JavaScript code can be written and executed inside Revit. LazJS provides full access to all .NET classes when possible.

Why JavaScript?

Script can be executed at runtime inside Revit and it does not need to be compiled beforehand. Thus, it can be modified on the fly and executed directly without leaving Revit environment.

Features

Access to Revit Objects

Access to Revit objects directly from Javascript including Project Information, Doors, Rooms, Phases, and etc.

Works with Parameters ParamJS

Add javascript formula to any parameter. E.g. Adding a formula on a Room's parameter to calculate Occupancy Load.

Works on Entire Project BatchJS

Write javascript that updates an entire project. E.g. Renumber all mark value to solve duplicate mark issue.

Free for Non-Commercial Use

If you're using Revit student version, you can use LazJS for free.

Code Libraries and Sharing

Comes with 20+ scripts. Upload and share your scripts with the community.

Built-In Excel Plugin

Export and Import data using Excel. Update parameter value or perform actions such as unplacing a room or deleting a light.

ParamJS

Assign JavaScript formula to any element's parameter

Ceiling Height in Room Tag

var ch = $e.Volume/$e.Area;
if ($e.Height > ch){
    ch;
} else {
    'No Ceiling'
}

Occupancy Load Parameter

//Using both Revit parameter and shared parameter
Math.ceil($e.Area / $e.get('Occupancy Load Factor'));

String Manipulation

//Combine strings in parameter
$e.TypeComments + ' ' + $e.Comments

BatchJS

Write script and run on the entire project. BatchJS already comes with 20+ scripts. Check out some of the scripts below.

  • Retag Doors

    Retag all doors. ROOMNUMBER-D(SUFFIX - Optional). SUFFIX are entered by user. Use either letter or number.

    BatchJS Door Tags renumber
  • Retag Windows

    Retag all windows. ROOMNUMBER-D(SUFFIX - Optional). SUFFIX are entered by user. Use either letter or number. SUFFIX can be ignored when there's only one window in a room (ignoreSequenceOnLoneWindow = true)

  • 3D Room Tags

    Copy room information into a signage.

    BatchJS 3D Room Tags
  • Delete Unused Views

    Find and delete unused section and elevations.

    BatchJS Delete unused views
  • Duplicate Multiple Views

    Duplicate selected views in the project browser and prompt for new name.

    BatchJS Duplicate multiple views
  • Views Uppercase

    Convert all view's name to uppercase.

    BatchJS Views Uppercase
  • ViewSheets Uppercase

    Convert all sheet's name to uppercase

    var viewSheets = $d.getViewSheets();
    viewSheets.forEach(function(viewSheet){
    	viewSheet.ViewName = viewSheet.ViewName.toUpperCase();
    });

  • 3D Label

    Copy host information into 3D label family.

    BatchJS 3D Label
  • Duct Taps Flip

    Flip selected duct taps. Selected non-tap elements will automatically be filtered

  • Plot by Sheet Number

    Plot sheets sorted by Sheet No parameter

  • Delete Imported Line Patterns

    Delete unused AutoCAD line patterns.

  • Space Naming Utility

    Copies Name & Number from Room to Space.

    var spaces = $d.getSpaces();
    spaces.forEach(function(space){	
    	space.Name = space.get(BuiltInParameter.SPACE_ASSOC_ROOM_NAME);
    	space.Number = space.get(BuiltInParameter.SPACE_ASSOC_ROOM_NUMBER);	
    });

Comments

Loading Comments...