Posts

Revit Dynamo View Form Python Output Form Resizable, Aggressively on top

import clr import sys clr . AddReference ( "System.Windows.Forms" ) clr . AddReference ( "System.Drawing" ) from System . Drawing import Size , Font , FontStyle , GraphicsUnit from System . Windows . Forms import ( Form , TextBox , FormBorderStyle , FormStartPosition , ScrollBars , DockStyle ) # join text list text = "\r\n" . join ( IN [ 0 ]) # new defaults DEF_W = 450 DEF_H = 800 MIN_W = 100 MIN_H = 100 DEF_TITLE = "Dynamo Viewer" def get_int_input ( idx , default_val , min_val ): try : v = IN [ idx ] except : return default_val if v is None : return default_val try : v = int ( v ) except : return default_val if v < min_val : return default_val return v # width and height with validation/fallback fWide = get_int_input ( 1 , DEF_W , MIN_W ) fHigh = get_int_input ( 2 , ...

Clear UTM references in MS Word

Attribute VB_Name = "DOC_Links" ' Module: UTM_Cleaner.bas Option Explicit Option Compare Text Public Sub CleanUTM () Dim doc As Document : Set doc = ActiveDocument Dim sr As Range , rng As Range Dim hl As Hyperlink Dim ils As InlineShape Dim shp As Shape Dim sec As Section , hf As headerFooter Dim fixed As Long Application.ScreenUpdating = False ' All story ranges For Each sr In doc.StoryRanges Set rng = sr Do For Each hl In rng.Hyperlinks fixed = fixed + CleanOneHyperlink ( hl ) Next hl For Each ils In rng.InlineShapes On Error Resume Next If Not ils.Hyperlink Is Nothing Then fixed = fixed + CleanOneHyperlink ( ils.Hyperlink ) On Error GoTo 0 Next ils Set rng = rng.NextStoryRange ...