Virtual Reality Headset for Navis? Cad? Interesting.

A friend mentioned this to me. Because I am working for an EPC (Engineering Procurement Company) that builds 3D models, I immediately put VR and Navis together. It turns out he was just mentioning a cool concept. Nonetheless – if this can all be put together for an EPC, a virtual head tour might not be far behind.

Oculous: http://www.oculusvr.com/blog/announcing-the-oculus-rift-development-kit-2-dk2/

Adding text box input to a function

1. Start by finding the function that runs the dialog box in AutoPlant, for me this was the “H.I.D. Stanchion Mount Lighting Fixture”.

2.Open Bentley AutoPlant Class editor.

Capture1

3.Find the function in the “Class List” window.

4.Double click on the selected class to open the class properties window.Capture2

5.After opening the window select the methods tab.

6.Using the “script path” column find the directory and file associated with the INPUT_METHOD.

7.Copy this file to your working directory and rename it.

8.In the class list window find and open the class associated with your functions.

9.In the window that was just opened click on the button next to “Method Key”, this will open the Method list window.

10. In the method list window click on the line next to the *.

NOTE: Once you have clicked on the line, clicking on anything other than a different part of the line or the update button at the bottom WILL crash the class editor.

Capture3

11. Under the “method” column write INPUT_METHOD, this name is required because AutoPlant will associate it with one of the predefined method types that can be seen in the previous window.

12. Under the Function column write the description of the function.

13. Under the script path write %APP_DIR%\Files_folder\File_name, %APP_DIR% indicates that the file is in your overall working directory, it should be left as %APP_DIR% and NOT be replaced with the directory path.

14. Click the “Update” button in the bottom left conner of the window, then click Ok to exit the window.

15. Click the save button in the top left of the Bentley Class editor window, if open AutoCAD/AutoPlant must be closed and restarted for the changes to take effect.

Exporting MS Access to Excel using VBA from within Excel – MS Access dB table stacker

Recently, I made an excel spreadsheet stacker where, given a list of excel workbook paths, it would stack them all into one. Then I thought, this would be beyond great to stack Bentley Spec tables on top of one another so we can do a search and troubleshoot quicker.

In short, open up the SpecTables table of each, export those tables that we find to Excel sheets, then use my stacker and stack them all on top of one another. Since the stacker removes any need to worry about column order – AND since it tells you what columns are “lost” we can run it many times until everything is under one umbrella.

Here are the links that helped me export from MS Access to Excel sheets but using Excel as the engine which holds the VBA that makes this all work

  • http://stackoverflow.com/questions/1849580/export-ms-access-tables-through-vba-to-an-excel-spreadsheet-in-same-directory
    • here was the heart of the macro tip from this guy

[vb]

Dim outputFileName As String
outputFileName = CurrentProject.Path & "\Export_" & Format(Date, "yyyyMMdd") & ".xls"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Table1", outputFileName , True
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Table2", outputFileName

[/vb]

  • http://www.mrexcel.com/forum/excel-questions/643188-excel-run-access-docmd-transferspreadsheet-into-activeworkbook.html

I had to add the MS Access reference (I am using both version 14 or MS Office 2010) and the reference for DAO 3.6 through the “Tools-Add Reference” menu in Excel’s VBA editor.

Comparison of MS Access, Filemaker and distributed ideas like MS SQL Server/ReportServices/ASPX

Here I am writing to a client explaining which technology is the best. The end use is a one table, muliti-report application. Perhaps a few tables with selection lists, but the main data is in one table. The 2nd phase adds 2 more tables. This company is not a Windows shop, but has no Macs or iOS devices per-se. All the desktops are for Windows.

An executive summary is that if you want to do a corporate application that is the most flexible and might have complicated interrelationships then the non-all-in-one approach is the best solution using one tool for the data storage (the database or dB), another to make the input screens (ASPX, .net, php, html) and another for reporting like reporting services or even MS Access – it is good for that but only that. This requires having the resources and time to get this completed. A hybrid approach is always an option as the tools discussed in this article do interact with each other.

If you want to get going, make large even mid-complex databases and get your work done fast and easy and have many reports that are very quick to develop by even the most basic database designers or business people – Filemaker wins hands down.

Again, if you feel you need to grow, a hybrid system would work best. There are not lots of us who know so many technologies though, and it limits things to more advanced or experienced people – hence the cost might increase.

Rarely should one use MS Access even if it is already installed and tempting you to click on it on your start bar. Continue reading

Filemaker Import from XML does not work on Filemaker Go – use InsertFromURL

This is a WT* moment in my opinion. Filemaker Go does not support the Import script function except from Filemaker databases and NOT from XML datasources from a website. Enter “Import From URL script step” to solve my issue. For the interim this means that for a work-around for my deadline, I had to copy the dB, work with Filemaker Pro desktop version to do the import, then upload this 2nd file to Filemaker Go a 2nd database. The alternative was to change the special API I made to prep the data into a properly formatted Filemaker FMRESULT xml file. The Import script step does NOT tell you on the help page this is the case – just the FM Go developer guide and the “NOT COMPATIBLE” text (the script line does NOT turn grey). This means at least 30% of the work I did to make the XML output from the other system was wasted effort.  I fought a little with the aspx that worked on a previous project and found that with the new .NET 4.5, I had to export an application\xml header explicitly before spitting out the XML data – had I known, I would have not had to fight because exporting text on a webpage is VERY clear to me. Alas, lesson learned – use Import From URL and parse text. This seems like a step backwards.

Well, I think there is hope to get my one FM dB on Filemaker Go by using the Import from URL script step. This guy as a great article about the topic which I wanted to save and share. I will have to export the data in a simple format, but I can use a loop through the text and import one record at a time from this text. I THINK I also need to put a retry loop in the system and a marker for end of data to ensure I have all the data (perhaps I don’t require it, but paranoia and only doing this once reigns!

Adding a button to Excel Ribbon via programming

OK – the title is misleading on purpose – in short you can’t do it via programming. You can for MS Project though. For excel all I have to say is …. Man people have too much spare time. Now … so do I !!! Incredible – how to add a ribbon item IN a xlsm file. It disappears once the workbook is closed though.

Once the utility is installed it is in your start menu called ‘Custom UI Editor For Microsoft Office’

http://stackoverflow.com/questions/8850836/how-to-add-a-custom-ribbon-tab-using-vba

Report Services Export to Excel Tips

First, I am using RS 2008 – not SP1 or anything. This is quite frustrating but I know 2014 is coming soon (many old bugs fixed), but alas, here are some tips of things that I am struggling with and others have too.

Use Consistent Units

First, if you are getting extra columns and/or rows and you want contiguous (no hidden ones) in between – make sure ALL YOUR UNITS ARE THE SAME. Use inches with inches and cm with cm’s. Also align the “top” and “left” numbers to 0’s when possible. The main point is use numbers like 1.7in or 3.5cm and not 1.45235in. If you get numbers like that AND you did align (snap) to other objects, most likely something is in another unit that you are snapping to – or that IT is aligned to.

Headers not consistent when exporting to Excel

This guy has the key. Use Can Grow and Can Shrink to “False”

Configuring OpenVPN for a PreShared or Static Keys for Windows client to pfSense Server

Well, this is less secure, but easier. Configure two computers with one key to complete a tunnel from one computer to another. Here are some links that helped me.

Below is a client file that matches the server file that I need to connect to.

[vb]

remote someserver.domain.com
proto udp
port 9999

#note there is no 0 behind tun – that is for linux
dev tun
#IP ADDRESSING mode example
# Server IP: 10.10.2.1; Client (this computer) 10.10.2.2
#there is a limitation to use .2 only if .1 is the server for the tunnel

ifconfig 10.10.2.2 10.10.2.1
#Windows needs full quoted path if spaces exist
secret "C:\\Program Files (x86)\\OpenVPN\\config\\my-static.key"
verb 3
#verb 9 troubleshooting
comp-lzo
keepalive 15 60

#daemon ; not for windows
#if we assume that our local OpenVPN machine is on 192.168.22.0/24 network
#but pfSense already is already told what network we are on the setting page
#route 192.168.22.0 255.255.255.0
[/vb]

 

Bentley Autoplant changing SysID’s – a way to do so in VBA code

OK – so I FINALLY have the whole mystery solved of what happens to SySID’s (sys id’s) in the front end (generation) and use (in DWG model files). Ideally they should match – so if you can’t change the source (out of my control) let try to change the destination?? Lets investigate.

First, I have needed to understand where Bentley puts all their data in AutoCAD. Finally I have an excuse to finish my investigation. I would like to change my Sys’IDs for a set of components so that the match the Spec Gen ones. So due to a situation out of my control (we simply wanted the Long Description changed), the SyS ID’s were all changed and it is more work to get them changed at the source than just change them in the DWG or AutoPLANT model. So lets look for them, find them and change them and heck, why not change some other items along the way like that Long Description.

In this article, lets look at all the XDATA apps that Autoplant uses. It discusses how to know what they are and what all the values are. Low and behold – the storage. Currently this article does not look at changing the values – that will come VERY shortly. Continue reading