Rhino Inside Revit Dimensions line by mouse click

Hello folks im currently working on Rhino inside revit grasshopper script that creates a Vertical/Horizontal dimension line by Left/Right mouse click on rhino screen , ive done this using Parakeet plugin , now ive managed to write the entire script and write the dimensions on Revit Active view, my problem is that the dimension only shows when i toggle on the Left/Right mouse button and disappears when i stop the click , ive even tried Data recorder or content cache , data recorder shows Deleted dimension as value and content cache freezes and i have to restart RIR , if someone could help find a quick fix for this as i think it should be something easy to fix as ive already prepared the entire process , i just need to bake each click in Revit , ive even tried with Gemini AI to help create a python script for this , it works sometimes but its very slow! and sometimes freezes

Cotation par clique.gh (32.1 KB)

cotation par clique.rvt (5.2 MB)

@amir_kharrat you can add Release Element Component but be careful it will not track the dimension and duplicates will be create. you can add the additional logic with left and right click to delete the last dimension before creating the new one

Hi,thanks for the reply! , ive added it to the script but it doest the same thing! the dimension gets deleted when i stop the toggle!

set the Release input to true

same !

Do you have any node or python script in your workflow which deletes the revit dimesnions?

no heres the script!

actually ive managed to do it through Tree structure and using data recorder! my only problem is that now the view im working on has a scope box that makes the view oriented , parallel to X,Y plane , and when i bring the view element geometry into rhino it comes disoriented , is there a way to automatically show the scope box oriented view? and not the real orientation of the project? i’ve even tried aligning the geometry and dimensions to XY plane but the final result isnt really clean, so there must be a way to link the view from its scope box directly no? because as you can see the dimensions are not aligned with the current revit active view??

Cotation par clique 1.gh (33.3 KB)

you can use view section Box

it works only if its 3d view? how about for floor plan view?

you should cast the floor plan boundary as a surface or Rectangle

then what? i dont understand how this could align my rhino view with revit current active view(set with its scope box orientation)

@amir_kharrat do you want to rotate your plan view?

do you see here , how the revit plan is showing its oriented to XY plane correctly? thats becayse its using a scope box in revit , and when i import the revit view geometry , the geometry is oriented to its original place(without scope box orientation) thats why the rhino geometry isnt oriented like on revit view do you udnerstand what i mean?

can you change the active view to any of the plan views that you have and check the result?

the active view needs to not have a scope box in order for the script to work perfectly

You need to adjust the view rotation according to the active view (the one you are using the extract the geometry.)

You are using detail lines to create the dimensions and they are view dependent.

.

It better to use the plan view or wall faces as a references to create the dimensions.

but when i rotate the view according to the active view and click to get dimensions they dont show in the correct palce in revit?

My recommendation would be to use the plan view to extract the Element Geometry as we as to create the dimension lines

yes i did that and when i did the geometry is not oriented like revit view