Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

See generated Walls while Add-In is running

7 REPLIES 7
Reply
Message 1 of 8
yahya_kilic
376 Views, 7 Replies

See generated Walls while Add-In is running

Hi everyone,

 

Is there a possibility to view the generated walls step by step in my active view (3D view) while my Add-In is executing?

For example: The task is to place 10 walls with a center-to-center distance of 1000mm. When I press start on the Add-In, I want to see each wall generated step by step in my 3D view while the Add-In is still active.

 

Is there a way?

Thank you in advance!

7 REPLIES 7
Message 2 of 8
yahya_kilic
in reply to: yahya_kilic

Found it 😂
I needed RefreshActiveView()

Message 3 of 8
yahya_kilic
in reply to: yahya_kilic

The placed elements are not in color (the same as when I close the Add-In).
Is there a way to archieve that?

 

Add-In active with RefreshActiveView()

yahya_kilic_1-1715767908793.png

Add-In closed

yahya_kilic_2-1715767933947.png

 

Is there a way?

Thank you in advance!

Message 4 of 8

Hi @yahya_kilic,

 

Use Grouptransactions, and within those a seperate transaction for each wall creation, RefreshActiveView shouldn't be needed then as the commit of the transaction will (force) display the created wall. See it that helps.

 

- Michel

 

Ps. I wouldn't recommend using a transaction for the creation of a single wall inside a group transaction if it's hundreds of walls, if will slow the whole operation down. For 10 walls or so it wouldn't cause a huge delay.

Message 5 of 8

Hi @TripleM-Dev.net,

 

I have one transaction and the 10 walls are created in a loop.

Thanks for the idea of a grouptransaction, but i don't want that because 10 walls was a example.

It could be also 100 walls but then it would be slow and I do not want that.

 

Mayby there is no solution for this.

Message 6 of 8

Hi @yahya_kilic,

 

The (possible) delay depends also on what other elements  are visible in the view.

If it's only the walls, even the 100 wouldn't be a huge delay.

Maybe group 5-10 walls in one transaction within the grouptransaction, or divide the number of walls to be created by 20 loops max....

 

I'm Curious, why do you want to see each wall being generated?

Message 7 of 8

Hi @TripleM-Dev.net,

 

I wanted this to allow the users to see the progress of their project.

Message 8 of 8

it is better to show progress in progress bar, Starting and closing transaction can be taxing for revit api .
My app import all porject of instalation and it can take long time(like 15 min, well I have 7 years old comp) for 10 store building with floor heating. 
I would suggest to only start transaction base on Level

-------------------------------------------------------------
--------------------------------|\/\/|------------------------
do not worry it only gonna take Autodesk 5 years to fix bug

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report