How to import 3D model into python GUI desktop software

Is there any way that I can import a 3D model(Revit Model) to a pyqt-programed GUI software by using some python third-package? I didn't find any solutions in how to import 3D model into PyQt's GUI software. I hope to import 3D model into a GUI software and visualize it using 3D views in this PyQt-programed GUI software

1 answer

Revit typically outputs several CAD-based file formats (you did not explicitely mention the exact file format of your Revit files: DXF?, DWF? etc). So you need a Python package able to deal with CAD data. I would recommend pythonOCC

See also questions close to this topic

I have a need to get the x/y coordinates from a PDF using the mouse pointer. I need to show a PDF to the user, then collect the x/y coords of the mouse pointer when they click the mouse button.

So if this file was displayed, the user could position the mouse over the top-left corner of the "Accelio" logo and clicked the mouse button, the code would return something like "50, 100", representing the X and Y of the mouse pointer location from the top-left (0,0) of the document.

The coordinates need to be the coordinates of the PDF, not the screen. I need to be able to use the coordinates that come in to then write some text or add an image to that PDF using PyMuPDF in some other code (which I already have working).

I have a task backsync_objects which fetches a set objects from API and create or update them in my database.

If I change for example order of one object on server, multiple webhooks are sent to my client because multiple objects changed order.

The problem is that this type of task can't run multiple times at one moment because it creates object/s if such object doesn't exists. In my case, it creates multiple equal objects because objects from previous webhook weren't commited yet.

I use print function, find the thread really start execute, but after several seconds, the program will exit without any message. Who can help me explain about this? Is it too complicated about the sub thread? :)

I want the text being above the svg item. This code is for example, the real code is pretty difficult, but the sence is the same. setZValue() does not work in this case and it is clear. There is some way or other decision?

In my program i want to use key press event in list view.When i press the enter key then only my selected text will print..Can any one please tell me how to use key press event for list view.I tried with installEventFilter but this method showing non type error.
Given below is my code:

Here is my sample code. When I click the index item in list view, I am getting the selection item,it's working fine.But I want to get the selected item using up and down arrows. Can anyone please help me. Thank you in advance.

I am working on Qtablewidget i tried following code this working fine for disable.
i wanted to enable tablewidget row contents on bases of row index .
when i clicked pushbutton that row should be enable.I am new to the stackoverflow please guide me.I am tring to enable tablewidget cell,pushbutton,combobox i am not getting please guide me how to enble particular row on bases of index.

with commandData being an ExternalCommandData object passed as an argument in the Execute method of the class.

My question is: how can I access commandData if I'm not in the Execute method? i.e. if commandData isn't passed as an argument. Can I just instantiate an Application object, just as I did with Python? How?

When doing a workitem post I'm a little unclear about the "rvtFile" and "result" arguments. Can the rvtFile url be in an aws bucket? Also what are the restrictions for the result website? It states that it needs to be a signed url, but can this just be another aws bucket? Or do I need to create a website? (Note: I've never done any web development. Everything I know i learned from this tutorial)

I'm curious the results of the code snip below. I want to grab a family by name and insert the very first symbol found in that family.

This works fine for families with multiple symbols. However, for those with no specific type definitions, sometimes symId.Count() = 1 and other times, a null exception is returned. Why is this the case?

I've installed pyRevit many times without any problems but I cannot get it to install on one particular machine.
The installer runs through fine and displays no error.
However when Revit starts there is no pyRevit screen and the addin tab does not appear.cou
Has anyone experienced this and could pass on a fix please.
Many thanks in advance.