Wednesday, July 27, 2016



Haven't found any descriptors for ALL the different DATATYPE parameters. Would imagine this as part of a database describing what the datatype is and how it is used and what disciplines are available would be supremely useful…

Did find these tidbits… Good overview to describe them all

Kind of Parameter
Who Creates it
Where does it live
Appear in Tags
Appear in Schedules
Description
System Parameters
Built in
Project and Family
Yes
Yes
Built-in to Revit, You cannot change it
Shared Parameters
User Defined
Project and Family
Yes
Yes
Custom Parameter created for the highest portability and flexibility
Project Parameters
User Defined
Project
No
Yes
Custom Parameter accessible to all objects in a Project
Family Parameters
User Defined
Family
No
No
Custom Parameter accessible only to the Family

And this from Autodesk on the file format:

Definition File

In-Product View https://knowledge.autodesk.com/sites/all/themes/autodesk_foundation5/images/standard/externalLink.gif
Applies to Revit 2016
Like (0) 



The DefinitionFile object represents a shared parameter file which is a common text file.

Definition File Format

The shared parameter definition file is a text file (.txt) with three blocks: META, GROUP and PARAM. The GROUP and PARAM blocks are relevant to the shared parameter functionality in the Revit API. Do not edit the definition file directly; instead, edit it using the UI or the API.
Although the Revit API takes care of reading and writing this file, the following section provides information the format of the file, which closely corresponds to the API objects and methods used to access shared parameters. The file uses tabs to separate fields and can be difficult to read in a text editor. The code region below shows the contents of a sample shared parameter text file.
Code Region 22-1: Parameter definition file example
# This is a Revit shared parameter file.
# Do not edit manually.
*META   VERSION MINVERSION
META    2       1
*GROUP  ID      NAME
GROUP   1       MyGroup
GROUP   2       AnotherGroup
*PARAM  GUID    NAME    DATATYPE       DATACATEGORY   GROUP   VISIBLE DESCRIPTION    USERMODIFIABLE
PARAM   bb7f0005-9692-4b76-8fa3-30cec8aecf74  Price   INTEGER        2       1       Enter price in USD     1
PARAM   b7ea2654-b206-4694-a087-756359b52e7f  areaTags       FAMILYTYPE     -2005020       1       1               1
PARAM   d1a5439d-dc8d-4053-99fa-2f33804bae0e  MyParam TEXT           1       1              1
·         The GROUP block contains group entries that associate every parameter definition with a group. The following fields appear in the GROUP block:
o    ID - Uniquely identifies the group and associates the parameter definition with a group.
o    Name - The group name displayed in the UI.
·         The PARAM block contains parameter definitions. The following fields appear in the PARAM block:
o    GUID - Identifies the parameter definition.
o    NAME - Parameter definition name.
o    DATATYPE - Parameter type. This field can be a common type (TEXT, INTEGER, etc.), structural type (FORCE, MOMENT, etc.) or common family type (Area Tags, etc). Common type and structural type parameters are specified in the text file directly (e.g.: TEXT, FORCE). If the value of the DATATYPE field is FAMILYTYPE, an extra number is added. For example, FAMILYTYPE followed by -2005020 represents Family type: Area Tags.
o    DATACATEGORY - An optional field for parameters whose DATATYPE is FAMILYTYPE.
o    GROUP - A group ID used to identify the group that includes the current parameter definition.
o    VISIBLE - Identifies whether the parameter is visible. The value of this field is 0 or 1.
0 = invisible
1 = visible
o    DESCRIPTION - An optional field for a tooltip for this parameter.
o    USERMODIFIABLE - Identifies whether the parameter is editable by the user.
0 = user cannot edit the parameter and it is greyed out in the UI
1 = user can edit the parameter value in the UI
In the sample definition file, there are two groups:
·         MyGroup - ID 1 - Contains the parameter definition for MyParam which is a Text type parameter, and the definition for areaTags which is a FamilyType parameter.
·         AnotherGroup - ID 2 - Contains the parameter definition for Price which is an Integer type parameter.
Of the 3 parameters in the sample file, only Price has a description. All of the parameters are visible and user modifiable.
Parent topic: Shared Parameters



Definition File | Search | Autodesk Knowledge Network

Definition File | Search | Autodesk Knowledge Network:



'via Blog this'

revit content hacks Archives - UNIFI

revit content hacks Archives - UNIFI:



'via Blog this'

Tuesday, July 26, 2016

free technology preview of Project Kameleon infrastructure modeling software extended to October 15, 2016 - It is Alive in the Lab

free technology preview of Project Kameleon infrastructure modeling software extended to October 15, 2016 - It is Alive in the Lab:



'via Blog this'
Companies with an IPO have stock holders who require profits; Every (A/E) company seems to meander they first become an IPO; losing sight of what would be best for the company and their employees having instead to focus on what is best for the stock holders. Training is definitely one of those areas, followed by locking down of a variety of tools then requirement of how those tools /must/ be utilized. Baking every employee fit the same mold(s) stifles creative problem solving and cuts off avenues which lead to incredible problem solving opportunities.

I love the adage "What happens if employees are trained, then leave... or, if if they are not trained and stay!?"

I am probably best described as an egalitarian idealist- If we train employees it raises the standard of care and work in our industry offering more opportunities in the long run, focusing on work and quality product rather than profits for the betterment of the greater good.

I have said in the past if I ever were to start a company with colleagues it would be not-for-profit company, with everyone having a say in the company's development, and a share in the profit (Or pushed to the betterment and growing of the company). The equations to weigh the input and divvy up the sharing are the parts I haven't found yet : )

To the point of technology- A360 is the first platform I have seen designed from the ground up with the /intent/ of covering schematic design through facilities management and operations. This is 100% in tune with our Design-build-finance-operate (BDFO) initiative. I can see A360 completely replacing its competitor Bentley Project Wise, but A360 is barely released and some of its major (Revit) components have some seriously large security flaws, and it is not yet fully integrated- but they are getting there.

The potential is there- Autodesk just needs to stay on target, track it and build it with care and consideration of its end users.

Tuesday, July 19, 2016

Zebedee SLAM

http://www.csiro.au/en/Research/D61/Areas/Robotics-and-autonomous-systems/Sensing-and-mapping-our-environment/Zebedee

Creascan

http://www.creaform3d.com/pulp/metrascan-3d-scanner/

Go slam for interior mapping

http://www.3dlasermapping.com/zeb1/

Wednesday, July 13, 2016

La Ruina Habitada (Porquera de los Infantes (Palencia), in Spain)

http://homeworlddesign.com/la-ruina-habitada-jesus-castillo-oli/

La Ruina Habitada is located in the town of Porquera de los Infantes (Palencia), in the region of Valdivia, Spain, historically known for being the home of the parents of Pedro de Valdivia who discovered Chile.

Project energyplus cloud graduated to insight 360

http://labs.blogs.com/its_alive_in_the_lab/2016/07/project-energyplus-cloud-to-graduate-to-insight-360.html

Autodesk energy plus about to be part of A360

https://energyplus.net/

Revit Import/Export for families- name this the same as the family(with a .txt not rvt extension) for creating an excel based family library manager!

Sub AddReferences()
''---------------------------------------------------------------------------------------------------------------------------------
'' REFERENCES CURRENTLY AVAILABLE:
AddReferenceGUID ("{000204EF-0000-0000-C000-000000000046}") ''VBA                              C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA7\VBE7.DLL
AddReferenceGUID ("{00020813-0000-0000-C000-000000000046}") ''Excel                            C:\Program Files\Microsoft Office\Office14\EXCEL.EXE
AddReferenceGUID ("{0D452EE1-E08F-101A-852E-02608C4D0BB4}") ''MSForms                          C:\Windows\system32\FM20.DLL
AddReferenceGUID ("{420B2830-E718-11CF-893D-00A0C9054228}") ''Scripting                        C:\Windows\system32\scrrun.dll
AddReferenceGUID ("{F935DC20-1CF0-11D0-ADB9-00C04FD58A0B}") ''IWshRuntimeLibrary               C:\Windows\system32\wshom.ocx
AddReferenceGUID ("{3F4DACA7-160D-11D2-A8E9-00104B365C9F}") ''VBScript_RegExp_55               C:\Windows\System32\vbscript.dll\3
AddReferenceGUID ("{565783C6-CB41-11D1-8B02-00600806D9B6}") ''WbemScripting                    C:\Windows\system32\wbem\wbemdisp.TLB
AddReferenceGUID ("{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}") ''Office                           C:\Program Files\Common Files\Microsoft Shared\OFFICE14\MSO.DLL
''---------------------------------------------------------------------------------------------------------------------------------
End Sub

Sub REVIT_SAVE_TO_CSV_TXT_FILE()
'
' SAVE_TO_CSV_TXT_FILE Macro
'
Dim FN As String
Dim FNtxt As String

    FN = ActiveWorkbook.Name
   
    FN = ReturnMatch(FN, "(.*)\.(xl[smx]{1,2}|txt)")   ''regexp to stroup xl?? or txt from filename
   
    FNtxt = ActiveWorkbook.path & "\" & FN & ".TXT"
    FN = ActiveWorkbook.path & "\" & FN & ".XLSm"
   
    Application.DisplayAlerts = False
   
    ActiveWorkbook.SaveAs _
       Filename:=FNtxt, _
       FileFormat:=xlCSV, _
       CreateBackup:=True, _
       ConflictResolution:=xlLocalSessionChanges, _
       AddToMru:=False
   
    ActiveWorkbook.SaveAs _
       Filename:=FN, _
       FileFormat:=xlOpenXMLWorkbookMacroEnabled, _
       CreateBackup:=True, _
       ConflictResolution:=xlLocalSessionChanges, _
       AddToMru:=True
   
    Application.DisplayAlerts = True

End Sub

Sub Revit_Reload_Current()
    Dim FN As String
    Dim I As Integer

    If MsgBox("This will erase everything and relaod the current file- continue?", vbCritical + vbYesNoCancel) <> vbYes Then
        MsgBox "Cancelled."
        Exit Sub
    End If

    ''strip extension
    FN = ThisWorkbook.FullName
    I = Len(FN)
   
    Do While Mid(FN, I, 1) <> "." And I > 0
    I = I - 1
    Loop
   
    I = I - 1
   
    If I = 0 Then
        MsgBox "Error extracting file Name- nothing updated", vbCritical
        Exit Sub
    End If
   
    FN = Left(FN, I) & ".txt"
'
    Range("A1").Select
    With ActiveSheet.QueryTables.add(Connection:= _
        "TEXT;" & FN _
        , Destination:=Range("$A$1"))
        .Name = "acm_LAYOUT"
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .RefreshStyle = xlOverwriteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .TextFilePromptOnRefresh = False
        .TextFilePlatform = 1252
        .TextFileStartRow = 1
        .TextFileParseType = xlDelimited
        .TextFileTextQualifier = xlTextQualifierNone
        .TextFileConsecutiveDelimiter = False
        .TextFileTabDelimiter = True
        .TextFileSemicolonDelimiter = False
        .TextFileCommaDelimiter = True
        .TextFileSpaceDelimiter = False
        .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
        .TextFileTrailingMinusNumbers = True
        .Refresh BackgroundQuery:=False
    End With
End Sub

Sub REVIT_OPEN_TXT()

Dim strFn As String

strFn = Application.GetOpenFilename _
(Title:="Please choose a file to open", _
FileFilter:="TEXT FILES (*.TXT),")

    If LCase(strFn) = "false" Then
       MsgBox "Nothing selected"
       Exit Sub
    End If
OPEN_TXT strFn

End Sub
Sub OPEN_TXT(strFn As String)
Dim wb As Workbook
    Excel.Workbooks.OpenText Filename:=strFn, _
        Origin:=437, _
        StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlNone, _
        ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, Comma:=True _
        , Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1), _
        Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8, 1), Array(9, 1), _
        Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array(14, 1), Array(15, 1), Array( _
        16, 1), Array(17, 1), Array(18, 1), Array(19, 1), Array(20, 1), Array(21, 1), Array(22, 1), _
        Array(23, 1), Array(24, 1), Array(25, 1), Array(26, 1), Array(27, 1), Array(28, 1), Array( _
        29, 1), Array(30, 1), Array(31, 1)), TrailingMinusNumbers:=True
   
    wb.Columns("A:BB").EntireColumn.AutoFit
   
    'Do While Len(strFN) > 1 And Right(strFN, 1) <> "\"
    '  strFN = Left(strFN, Len(strFN) - 1)
    'Loop
    'strFN = ActiveWorkbook.Name

strFn = ReturnMatch(strFn, "(.*)\\(.*)\.(xl[smx]{1,2}|txt)", 1)  ''regexp to stroup xl?? or txt from filename

strFn = ActiveWorkbook.path & "\" & strFn & ".XLSX"
ActiveWorkbook.SaveAs Filename:=strFn, FileFormat:=xlCSV, CreateBackup:=True, _
   ConflictResolution:=xlLocalSessionChanges, AddToMru:=False
  
End Sub


Function ReturnMatch(strStr, strMatch, Optional SUBMATCH As Integer)
    ''VBA include Microsoft VBSCript Regular Expressions 5_5
    Dim r 'As New RegExp       ''Regexp engine
    Dim m 'As MatchCollection  ''Return value
    Dim I, X()
    'Dim StrMatch ''as pattern match
    If InStr(1, strMatch, "(") + InStr(1, strMatch, ")") = 0 Then     ''add () for subexpression to return something...
        If Left(strMatch, 1) <> "(" Then strMatch = "(" & strMatch
        If Right(strMatch, 1) <> ")" Then strMatch = strMatch & ")"
    End If
   
    Set r = New regexp
    r.Pattern = strMatch
    r.IgnoreCase = True
   
    Set m = r.Execute(strStr)
   
    ''Regexp os base-o arrays so info rturned starts at (0) not (1)
    On Error Resume Next
    If m.count = 0 Then
        ReturnMatch = ""    ''return null
        Exit Function       ''nomatch
    Else
        ReturnMatch = m(0).SubMatches(SUBMATCH) ''return 1st submatch
    End If
End Function


''================================================================================================================================
''===REFERENCES TOOLS SECTION=====================================================================================================
''================================================================================================================================
''RESOLUTION
''For any Automation client to be able to access the VBA object model programmatically, the user running the code must explicitly
''grant access. To turn on access, the user must follow these steps.
''
''Office 2003 and Office XP
''Open the Office 2003 or Office XP application in question. On the Tools menu, click Macro, and
''then click Security to open the Macro Security dialog box.
''
''On the Trusted Sources tab, click to select the Trust access to Visual Basic Project check box to turn on access.
''Click OK to apply the setting. You may need to restart the application for the code to run properly if you automate from a
''Component Object Model (COM) add-in or template.
''
''Office 2007
''Open the 2007 Microsoft Office system application in question. Click the Microsoft Office button, and then click Application Options.
''Click the Trust Center tab, and then click Trust Center Settings.
''Click the Macro Settings tab, click to select the Trust access to the VBA project object model check box, and then click OK.
''Click OK.
''
''---------------------------------------------------------------------------------------------------------------------------------
'' REFERENCES CURRENTLY AVAILABLE:
'' VBA                 {000204EF-0000-0000-C000-000000000046}     C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA7\VBE7.DLL
'' Excel               {00020813-0000-0000-C000-000000000046}     C:\Program Files\Microsoft Office\Office14\EXCEL.EXE
'' stdole              {00020430-0000-0000-C000-000000000046}     C:\Windows\system32\stdole2.tlb
'' Office              {2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}     C:\Program Files\Common Files\Microsoft Shared\OFFICE14\MSO.DLL
'' Scripting           {420B2830-E718-11CF-893D-00A0C9054228}     C:\Windows\system32\scrrun.dll
'' IWshRuntimeLibrary  {F935DC20-1CF0-11D0-ADB9-00C04FD58A0B}     C:\Windows\system32\wshom.ocx
''---------------------------------------------------------------------------------------------------------------------------------

Private Sub ListReferencePaths()
    ''http://www.vbaexpress.com/kb/getarticle.php?kb_id=278
     'Macro purpose:  To determine full path and Globally Unique Identifier (GUID)
     'to each referenced library.  Select the reference in the Tools\References
     'window, then run this code to get the information on the reference's library
     'OUTPUT TO DEBUG WINDOW FOR COPY-PASTE ABOVE EACH MODULE
     Dim strFormat
    On Error Resume Next
    Dim I As Long
    'With ThisWorkbook.Sheets(1)
    '    .Cells.Clear
    '    .Range("A1") = "Reference name"
    '    .Range("B1") = "Full path to reference"
    '    .Range("C1") = "Reference GUID"
    'End With
    Debug.Print "''---------------------------------------------------------------------------------------------------------------------------------"
    Debug.Print "'' REFERENCES CURRENTLY AVAILABLE:"
    On Error GoTo ListReferencePathsErr
    For I = 1 To ThisWorkbook.VBProject.References.count
        With ThisWorkbook.VBProject.References(I)
        Debug.Print "AddReferenceGUID(" & VBQT & Trim(Format(.Guid, "!" & String(40, "@"))) & VBQT & ") ''" & Format(.Name, "!" & String(32, "@")) & " " & Format(.FullPath, "!" & String(64, "@"))
            'ThisWorkbook.Sheets(1).Range("A65536").End(xlUp).Offset(1, 0) = .name
            'ThisWorkbook.Sheets(1 ).Range("A65536").End(xlUp).Offset(0, 1) = .FullPath
            'ThisWorkbook.Sheets(1).Range("A65536").End(xlUp).Offset(0, 2) = .GUID
        End With
    Next I
   
    Debug.Print "''---------------------------------------------------------------------------------------------------------------------------------"
On Error GoTo 0
Exit Sub
   
ListReferencePathsErr:
    Debug.Print "''---------------------------------------------------------------------------------------------------------------------------------"
    Debug.Print "''ERROR-- VBA INACCESSIBLE"
    On Error GoTo 0
End Sub

''ThisWorkbook.VBProject.References.AddFromGuid _
''    GUID:="{0002E157-0000-0000-C000-000000000046}", _
''    Major:=5, Minor:=3
Sub AddReference()
    ''http://stackoverflow.com/questions/9879825/how-to-add-a-reference-programmatically
   
    Dim VBAEditor 'As VBIDE.VBE
    Dim VBProj 'As VBIDE.VBProject
    Dim chkRef 'As VBIDE.Reference
    Dim BoolExists As Boolean

    Set VBAEditor = Application.VBE
    Set VBProj = ActiveWorkbook.VBProject

    '~~> Check if "Microsoft VBScript Regular Expressions 5.5" is already added
    For Each chkRef In VBProj.References
        If chkRef.Name = "VBScript_RegExp_55" Then
            BoolExists = True
            GoTo CleanUp
        End If
    Next

    VBProj.References.AddFromFile "C:\WINDOWS\system32\vbscript.dll\3"

CleanUp:
    If BoolExists = True Then
        MsgBox "Reference already exists"
    Else
        MsgBox "Reference Added Successfully"
    End If

    Set VBProj = Nothing
    Set VBAEditor = Nothing
End Sub


''''''------------------------------------------------------------------------------------------------
''http://www.vbaexpress.com/kb/getarticle.php?kb_id=267
Sub AddReferenceGUID(strGUID As String)
     'Macro purpose:  To add a reference to the project using the GUID for the
     'reference library
   
    If strGUID = "" Then Exit Sub
    
    Dim theRef As Variant, I As Long
    
     'Update the GUID you need below.
    ''strGUID = "{00020905-0000-0000-C000-000000000046}"
    
     'Set to continue in case of error
    On Error Resume Next
    
     'Remove any missing references
    For I = ThisWorkbook.VBProject.References.count To 1 Step -1
        Set theRef = ThisWorkbook.VBProject.References.Item(I)
        If theRef.isbroken = True Then
            ThisWorkbook.VBProject.References.Remove theRef
        End If
    Next I
    
     'Clear any errors so that error trapping for GUID additions can be evaluated
    Err.Clear
    
     'Add the reference
    ThisWorkbook.VBProject.References.AddFromGuid _
    Guid:=strGUID, Major:=1, Minor:=0
    
     'If an error was encountered, inform the user
    Select Case Err.Number
    Case Is = 32813
         'Reference already in use.  No action necessary
    Case Is = vbNullString
         'Reference added without issue
    Case Else
         'An unknown error was encountered, so alert the user
        MsgBox "A problem was encountered trying to" & vbNewLine _
        & "add or remove a reference in this file" & vbNewLine & "Please check the " _
        & "references in your VBA project!", vbCritical + vbOKOnly, "Error!"
    End Select
    On Error GoTo 0
End Sub