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 + Resizing

import clr clr . AddReference ( "System.Windows.Forms" ) from System . Windows . Forms import Form , TextBox , FormBorderStyle , FormStartPosition , AnchorStyles def popup ( text ): form = Form () form . Width = 400 form . Height = 300 form . Text = "Script Result:" form . FormBorderStyle = FormBorderStyle . Sizable # Allow resizing form . MaximizeBox = False form . MinimizeBox = False form . StartPosition = FormStartPosition . CenterScreen textbox = TextBox () textbox . Multiline = True textbox . ReadOnly = True textbox . ScrollBars = 3 # Both horizontal and vertical scrollbars textbox . Text = text textbox . Anchor = AnchorStyles . Top | AnchorStyles . Bottom | AnchorStyles . Left | AnchorStyles . Right # Resize with form textbox . Dock = 5 # Fill textbox . WordWrap = False form . Controls . Add ( textbox ) form ...

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 = ...