Friday, April 25, 2014

Routine to automatically pull images and put in placeholders in powerpoint

So I had this issue the other night where a routine I have been using and tweaking over the past few years stopped working.  It is really relatively simple- about 150 lines of code but the core of the routine that put the images into the slides stopped working Monday. I am using office 365 x64 bit.

Figured it out how to get it working again - apparently there is a glitch in VBA - and an old approach started working again and by adding 0.1 second waits, the routine is working (so very odd). Being x64 office may be part of the issue, but it was working at the beginning of the year.
Here is the heart o the code that actually inserts the images:
    For Each ObjFile In ObjFolder.Files
        If ObjFile.Name Like "*.png" Then
            Set pre = Application.ActivePresentation
            ''This sets the slide type:
            Set ObjSlide = pre.Slides.Add(Index:=pre.Slides.Count + 1, Layout:=ppLayoutChart)
                ObjSlide.Shapes(1).TextFrame.TextRange = ObjFile.Name '' "Title of Slide"
            ''add the picture- which doesn't add it to the shape
            With ObjSlide.Shapes.AddPicture(FileName:=ObjFile.Path, LinkToFile:=msoFalse, _
                SaveWithDocument:=msoCTrue, Left:=0, Top:=0, Width:=-1, Height:=-1)
                ''then we CUT the image
                .Cut
            End With
            Wait 0.1
            ''this worked for a while but stooped a few months ago kindof works again...
            ''Have to activate the slide to select a placeholder
            ObjSlide.Select
            Wait 0.1
            ''Have to activate the slide again or it fails to select a placeholder
            ObjSlide.Select
            Wait 0.1
            ''This selects the name of the frame we want to use to put the image in -
            '' there are several of these
            ObjSlide.Shapes("Chart Placeholder 2").Select
            Wait 0.1
            ''paste the clipboard into the active placeholder
            ObjSlide.Shapes.Paste
        End If
    Next ObjFile
Here is the WAIT routine:
Sub Wait(Seconds As Double)
   Dim start
   start = Timer
   While Timer < start + Seconds
      DoEvents
   Wend
End Sub

Tuesday, April 22, 2014



Wednesday, April 9, 2014

Google lost their minds a month ago- here is a good google new tab redirect app....

Check out "New Tab Redirect": https://chrome.google.com/webstore/detail/new-tab-redirect/icpgjfneehieebagbmdbhnlpiopdcmna?utm_source=gmail

Intel RCS25ZB040 Controller Card - Newegg.com

oooo.... aaaah....

Intel RCS25ZB040 Controller Card - Newegg.com: "Intel RCS25ZB040 PCI-Express 3.0 x8 Low-profile, 6.6" length (MD2 compliant) SATA / SAS RAID SSD Cache Controller"



'via Blog this'

Monday, April 7, 2014

What Revit Wants: Baking your own free RPC content and adding it to Revit 2013

What Revit Wants: Baking your own free RPC content and adding it to Revit 2013:

'via Blog this'


Baking your own free RPC content and adding it to Revit
Some of the old-school Revit users may already be familiar with this process, but here it is: you want to make your own RPC, perhaps to signify an existing tree to be retained, and you would like it to show in a render.

These are actually very useful in Realistic views too, because (as you probably already know) Revit shows the RPC image when a view is set to Realistic.

In simple terms:
Use the free RPC Creator utility, a photo of the tree, and an image mask (a black and white image created in Photoshop or a similar tool, where white is the part of the image to be rendered)
After you have created the RPC file, you need to put it into the appropriate location, probably:
somepath\Common Files\Autodesk Shared\Materials\2013\assetlibrary_base.fbm\RPCs
Restart Revit
Your RPC will now be available in the RPC library, and accessible when creating or modifying a Family based on the RPC template.
I used an old version of the RPC Creator installer that I had, but you can download the 'current' free version at:
http://acm.archvision.com/support/downloads/RPC_Creator_1610.exe

One key thing - you need to enter size units in cm when using the RPC Creator. For a full tutorial, check out:
Creator Pro Tutorials

Also, to help size the 'width' of your tree, you might want to measure the aerial image on Google Earth (using the Google Earth measure tool). At least then you know that the image will be in the right ballpark for size. The size can be easily modified in the Family Type Properties once you have the RPC installed in the right folder.

Notes:
RPC location for XP 64 bit:
C:\Program Files (x86)\Common Files\Autodesk Shared\Materials\2013\assetlibrary_base.fbm\RPCs

You need to exit and restart the Revit program each time you add or modify an RPC file in that folder

If you want to activate RPC creator (this should be free), use the ID number submit tool at:
http://archvision.com/products/plugin#rpc-creator-pro