Posts

Showing posts from October, 2022

Git hub micro def repository started

Started a micor def repository for CPY3.r22 python routines for faster searching and references.  https://github.com/apsis0215/Revit-CYPython3-r22-Micro-defs
Image
  Interesting post from over a year ago comparing #Python #Csharp (C#) #Cpp (C++) and #Cppx64 (C++x64 bit). Python is exponentially slower than C++. There is no question that for larger long term development shifting or converting to C is immensely beneficial - particularly for longer term runs of applications or addins. Would externalizing addins on separate threads also speed things up or does Revit even allow apartment threading for addins? To put it in perspective Python is slower than C++ by a factor of more than 100 in these examples. Longer term runs show exponential performance increases with lower level languages (i.e. C++ and C#.) because of pythons interpretive nature (It doesn't' compile it runs from native code) Dave's Garage: Python -VS- C# -VS- C++(32) -VS- C++(64)   https://youtu.be/D3h62rgewZM?t=1352 Dave's Garage: Python -VS- C# -VS- C++(32) -VS- C++(64) https://lnkd.in/gmwZiDTb

Revit dynamo simple dialog with wrapping and vertical scroll

Image
import clr import sys clr . AddReference ( "System.Windows.Forms" ) clr . AddReference ( "System.Drawing" ) import System from System import Drawing import System . Drawing import System . Windows . Forms from System . Drawing import * from System . Windows . Forms import * import math ##https://forum.dynamobim.com/t/reporting-to-user-at-the-end-of-dynamo-player-script/37421/6 from System . Windows . Forms import Form , Label , Button , FormBorderStyle , FormStartPosition ################################################################################# class popup ( Form ): ## def __init__ ( self , text ): self . InitializeComponent ( text ) def InitializeComponent ( self , text ): #form = Form() self . ClientSize = System . Drawing . Size ( 300 , 200 ) ##Height self . Text = "Result:" ##Form Title self . FormBord

Revit Dynamo Python Simple Dialog

  import clr clr . AddReference ( "System.Windows.Forms" ) ##https://forum.dynamobim.com/t/reporting-to-user-at-the-end-of-dynamo-player-script/37421/6 from System . Windows . Forms import Form , Label , Button , FormBorderStyle , FormStartPosition def popup ( text ): form = Form () form . Width = 300 #Width form . Height = 200 ##Height form . Text = "Script Result:" ##Form Title form . FormBorderStyle = FormBorderStyle . FixedDialog ##Remove the maximize box. form . MaximizeBox = False ## Set the MinimizeBox to false to remove the minimize box. form . MinimizeBox = False ## Set the accept button of the form to button1. form . StartPosition = FormStartPosition . CenterScreen label = Label () label . Parent = form label . Text = text label . Width = form . Width - 20 label . Heig

Dynamo DYF Excel manager (Basic)(VBA)

Read DYF Files into excel and update UUIDs Category Description Name Base on PAth. Macro:DYF_READ  then update then  Macro:DYF_UPDATE Updated to show old UUID and function for new at left automatically. 2022-10-24-Update - changes file name to match NAME converting "." to "-" n the name before comitting changes. Attribute VB_Name = "ReadDYF" Option Explicit Const fp = "C:\Users\rallen\AppData\Roaming\Dynamo\Dynamo Revit\2.12\definitions\" Const vbQt = """" Const RQ = "\" & """" Const rpGUI = "(.*?" & RQ & "Uuid" & RQ & ":\W" & RQ & ")([0-9a-f\-]{36})(" & RQ & ".*$)" Const rpCAT = "(.*?" & RQ & "Category" & RQ & ":\W" & RQ & ")(.*)(" & RQ & ".*$)" Const rpDES =