I don’t really know much about VBA except what I observed being written around me for AutoCAD and Excel several years ago, but I had a need for some today. It’s pretty simple, but if you have a bunch of images linked to files on your computer in an Excel spreadsheet and want to remove the hyperlinks before sending the file to anyone here’s a little macro that will do the trick.
Sub RemoveImageHyperlink()
' Loop through each image and remove the hyperlink
Dim Pic As Shape
For Each Pic In ActiveSheet.Shapes
If Pic.Type = msoPicture Then
Pic.Hyperlink.Delete
End If
Next Pic
End Sub
I’ll leave it to you to figure out how to open the VBA editor and make run it.
James Vandezande gave a presentation this past Tuesday about the recently published AGC BIMForum LOD Specification for 2013. It’s a precursur to a class he’s teaching at AU this year and it’s worth watching if you are at all interested in where the future of BIM deliverables is headed. According to the user group’s page
After two years of work, the AGC BIMForum and AIA have published the first industry specification for the reliability of building information modeling data - the Level of Development (LOD) Specification 2013.
James Vandezande served as the chair of the Exterior Enclosure sub-group for the LOD Spec. James will introduce the document and share some insight behind the robust deliberations conducted in the work group.
Recorded at the October 15, 2013 meeting of the NYC Revit Users Group, this video features James Vandezande from HOK discussing the first release of the Level of Development (LOD) Specification.
As I’ve said before, it’s always good to know your way around the commandline on Windows (or any platform for that matter). You can get a lot done with a few short commands. Today I want to document one simple command that I use quite often with one option that I usually forget and have to look up when it’s important. The command is to write a list of file and folder names to a text file. That’s it. Simple, but think about how you would get this otherwise - not so easy.
Open the commandline, navigate to the folder you want to get a listing for and type the following at the commandline.
The dir
is a directory listing and the /b
option tells it to show just the bare file (or folder) name. the /o
option tells it to sort the listing and the :n
modifier tells the sorting to be by name. There are other options for sorting, but you can also just leave the /o:n
portion off and paste the text into Excel or use your text editor to sort the list if you need it. That’s the part I always forget…
I use this because I often want to send someone a list of filenames or occasionally I want to create a batch file that renames files, so I use this to get the original filenames and go from there in a text editor or Excel.
Here’s a great presentation from on of my former colleagues about what IFC is and why it’s important. I’m not sure why I didn’t watch it until today, but I’m glad I did. Makes me want to stop using Navisworks and start using Solibri.
Here’s a quick one that’s more of a Windows tip than a Revit tip, but it can come in handy to someone who manages files on network drives that aren’t always mapped to a drive letter. For example, when you need to get a quick list of files from a network folder.
I learned this from a Superuser forum response, but you can find more information on Wikipedia or just a quick Google search.
The scenario is simple, I’m in Windows Explorer looking at a folder of files and I want to email that list of files to someone so they can comment on it. I could take a screenshot, but I’d rather have text. Normally I would open the command prompt, cd
to the location and type the following:
C:\path\to\files> dir /b > list.txt
This would list the files and folders (that’s the ‘/b’ part) and write that to a text file named list.txt which I could then open and manipulate. This doesn’t work on a UNC path. Windows tells you “CMD does not support UNC paths as current directories.” However with this newly discovered pushd
command, I can do the following:
C:\path\to\files> pushd \\server\uncpath\to\files
X:\uncpath\to\files> dir /b > list.txt
X:\uncpath\to\files> popd
C:\path\to\files>
As you can see, the first command pushd
takes the UNC path and temporarily maps it to a drive letter where I can operate on it as a local path. The second command popd
deletes the temporary drive and returns you to where you were. Simple.