Custom modules for Python in BricsCAD v25

Hello,

I am a beginner programmer, and I want to write a script in Python to read information from an Excel file into the attributes of 3D elements. I want to use the 'pandas' module, and I have installed all the latest libraries, including pandas and numpy.

Can someone guide me step by step how to add custom modules for bricsCAD python?

I was inspired by video bellow but there is solution for python 3.9 (im running 3.13) and dont know how to connect with proper module.

I would greatly appreciate your support.

Comments

  • Plugins for BricsCAD can be written either in C# (.Net) or C++ (BRX). This is the only way to get full support for all APIs. Retraining for C# is not difficult. It is definitely not worse than Python.

  • In addition 2 ct: If I had to begin programming again I still would choose CAD Lisp: Little code, no compiling, great results and literally tons of examples available on the net.

  • It looks like you didn’t install pandas correctly, while I’ve never used BIM Python, I read somewhere that you have to pip the modules, then copy them into the site-packages for BricsCAD. I can’t find the documents now.

    As a side note, there’s a project here that wraps BRX in Python.

    It’s not directly supported by Bricsys, so it’s maybe more geared towards people already familiar with BRX APIs https://github.com/CEXT-Dan/PyRx

  • Hi,

    Indeed, BIM Python uses its own Python version, not the Python you might have installed on your computer. And as a result, BIM Python doesn't have access to the packages you installed in your own Python installation.

    Until now, you had to manually copy-paste the packages.

    But in V25.2 beta version, there is a PIP command inside BricsCAD that allows you to directly install additional Python packages.

  • Sebastian
    edited March 4

    I tried to install numpy using pip install numpy, but could not get any command feedback nor find any installed packages. Please share a sample when working.

  • Which version are you using? You didn't get any feedback at all?

    This is my command line output:

    : PIP
    Choose command [List/Install/Uninstall/Freeze] <List>: i
    Give the name of the Python module or install from [requirements File]: numpy
    Collecting numpy
    Using cached numpy-2.0.2-cp39-cp39-win_amd64.whl (15.9 MB)
    Installing collected packages: numpy
    Successfully installed numpy-2.0.2

  • Packages are installed in

    C:\Users\username\AppData\Roaming\Bricsys\BricsCAD\V25x64\en_US\Support\python39

  • Its_Alive
    edited March 4

    C:\Program Files\Bricsys\BricsCAD V25 en_US\python39

    C:\Users\Dan\AppData\Roaming\Bricsys\BricsCAD\V25x64\en_US\Support —— Has no Python folder

    : PIP

    Choose command [List/Install/Uninstall/Freeze] <List>: I

    Give the name of the Python module or install from [requirements File]: numpy

    : PIP

    Choose command [List/Install/Uninstall/Freeze] <List>: //clicked list

    Unable to recognize entry. Please try again.

    guessing its an install issue? I did not reinstall, just updated

  • I am using 25.2.02 and coming from upgrade path. Will try a fresh install

  • I could not get it to work with a fresh install

    “Maybe cad-pyrx can tap into. Would be cool!”

    Possible, Bricsys could expose the functionality via BRX and make a pull request.

  • Thank you for your responses – I was ultimately able to connect the modules using:

    import site
    site.addsitedir('path')
    

    I installed Python 3.9 on my system, then downloaded the necessary modules (using pip) and copied them to an external folder from the default Windows path. In my case, these modules were Pandas, NumPy, and OpenPyxl. And its working well.

    Apologies for the late reply; I was away from my computer.

  • Hi.

    I need help with using pyhton in bricscad…

    1. what do I need to download from where and where to?
    2. how do I install after downloading?
    3. how do I run pyhton code after doing the above?

    thanks,

    aridzv.