PDA

View Full Version : how to request data from Database



Len
09-26-2009, 07:20 PM
Hello,

My question is applicable to all three: PDS, AutoPlant and Smart-Plant.

I need to read the following data for every Pipe-Support Point from all Piping Models of the given Project:
1. Plant Coordinates XYZ
2. Name of the Pipe-line the Support belongs to
3. Diameter of the Pipe being supported
4. Support ID (or Tag)

I know these data could be requested directly from the Database and obtained almost instantly without even opening the Piping Models.

I understand that I should develop three independent Utilities: one for PDS, one for AutoPLant and one for SmartPlant. Each Utility would send a call to its respective Database and record the response.
Every such response (containing 4 items I noted above) would be dumped to my own data file. From this file I can easily generate all Piping-Supports Points (in AutoCAD for now) for the given Project and repeat/update this "constellation" daily or twice a day.

My main problem now is the development of three Utilities for requesting data.
Has anyone programmed similar Utilities?
I guess it could be one of .Net codes, am I right?

Cheers,
Len

3DCAD-IT
09-28-2009, 07:47 AM
Len,

I could write you up something for SmartPlant in .net. Is it possible for me to get a backup of your project?

Send me an IM to discuss

dave
09-28-2009, 08:47 AM
3D CAD, would this be a stand alone program? I wasn't aware you could interface with Lama in .net. Thanks!

3DCAD-IT
09-28-2009, 09:07 AM
This would be a stand alone program using .net 2.0 framework. Pardon my ignorance but what is Lama?

dave
09-28-2009, 09:12 AM
Lama is the automation layer in SPPID/SP3D

3DCAD-IT
09-28-2009, 09:26 AM
In v2009 it can be done using the SP3D .net api's. I'm not sure if it can be done in v7 using vb6 or not.

Its easier to access the data externally, which is version independant. I've written a few external apps already for v7 which have worked in my v2009 tests.

If the program is to be used by Admins I prompt the user of the program for the server name, site and model database names. For designers or people who do not know this information I pull the data from an ini file which would be populated by an Admin.

dave
09-28-2009, 09:32 AM
yeah that's cool. I often need to call other dll's like itemtag or some custom ones I've written. So I often work externally (like grabbing data from PDS or SPI databases via SQL) while inside lama. But alas, I am not a fancy .net programmer yet, just vba/vb6. Hopefully this year I can learn .net. :)

edit: hopefully you don't give the users WRITE permission to the database with your apps! :D

3DCAD-IT
09-28-2009, 09:48 AM
<snip>
hopefully you don't give the users WRITE permission to the database with your apps! :D

Never :), the v7 apps I'v written are information only apps. Audit data and display what's found to be non conforming.

In v2009 we are planning alot of automation mostly around Iso production. These apps will create / modify / delete objects, they will be run by the users but contolled via external data.

Len
09-29-2009, 09:22 AM
Hello 3DCAD-IT,

Sorry for missing yesterday; I didn't have chance to look at the forum.

You asked for a backup of my project:

if you mean an EPC project - currently I don't have it and I really need one.

if you mean the software development project - it is called PLETRAN (stands for Pipe Load Electronic Transfer) and in general the program (VBA-AutoCAD for now) is aimed at transferring Piping Loads from Stress (AutoPipe or Caesar-II) to Structural Analysis software (S-Frame or RISA 3D).

If you talk to any structural engineer involved in pipe-rack design, he/she would tell you that manual processing of stress output is the most tedious, time-consuming, error-prone activity not related to structural engineering itself.

You may ask why I need data for Support-Points from CAD-Piping:
- to allocate Support-Nodes from Stress Output in correct Plant Coordinates i.e. synchronize it with 3D-CAD Support-Points
- then to classify all Support-Points on:
- Defined (Piping & Stress coincidental)
- Undefined (Piping with no Stress counterparts)
- New (Stress Nodes with on Piping counterparts)
and color these points (or 3D-bubbles if you will) with three distinctive colors.
For Defined and New Support-Nodes the load values and type of support is assigned from the Stress Output.
For every Undefined Support - the Structural Engineer will go talk to Piping Designer and to Stress Engineer to resolve the issue.

This is only the first part of PLETRAN project. My partner and I have been working on it for almost a year and, strangely enough, we've almost finished other parts of PLETRAN workflow but this first part is probably the weakest of all.

I'd like to discuss with you the development of Smart-Plant-Support-Reading Utility.

My apologies for being so illiterate - what is IM that I should send to you?

Cheers,
Len :D