Draw on UCS Front View

Instead of drawing on the default top view. The code below will show how to draw on the front view ' set the world ucs With acadDoc Set currUCS = .UserCoordinateSystems.Add(.GetVariable("UCSORG"), .Utility.TranslateCoordinates(.GetVariable("UCSXDIR"), acUCS, acWorld, 0), .Utility.TranslateCoordinates(.GetVariable("UCSYDIR"), acUCS, acWorld, 0), "OriginalUCS") End With 'Create a UCS and make it current origin(0) = 0: origin(1) = 0: … Continue reading Draw on UCS Front View

Add a Viewport and Show Front View

This will create a viewport in paper space and instead of the standard top view, the viewport will show as the front view center(0) = 5.4682: center(1) = 1.4055 dblviewdirection(0) = 0: dblviewdirection(1) = -1: dblviewdirection(0) = 0 Set pviewportObj = acadDoc.PaperSpace.AddPViewport(center, vpwidth, 2.2565) pviewportObj.direction = dblviewdirection pviewportObj.Layer = "viewport" pviewportObj.Display True acadDoc.MSpace = True … Continue reading Add a Viewport and Show Front View

Clear All Check Boxes In Excel VBA Userform

This example uses a for each loop so that each check box name does not have to be explicitly written out. This is useful when you are adding more control and limit the amount of code you are writing. Better Method Dim ctrl As Control Sub ClearAllButton_Click() For Each ctrl In exportFilesUF.Controls If TypeName(ctrl) = … Continue reading Clear All Check Boxes In Excel VBA Userform

Compile Bill of Materials and Remove Duplicates

This example builds upon the methods of finding duplicate data. See https://pearlsnake.com/2019/06/20/find-and-delete-rows-with-duplicate-data/ In order for a row to be complied, Column A, E and K have to match the data in other rows. After running the example the data was been reduced from 35 rows to 30 rows. This helps purchasing departments so they don't … Continue reading Compile Bill of Materials and Remove Duplicates