Transformations on Cells from Database
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Transformations on Cells from Database

 
Post new topic   Reply to topic    CADForums.net Forum Index -> MicroStation
Author Message
Alexander Heide
Guest





Posted: Tue Feb 10, 2004 9:59 pm    Post subject: Transformations on Cells from Database Reply with quote

Hi Group!!

I have some trouble in VBA programming and hope to find here
new ideas.

I have a database with information about the geometry of elementary
cells.
We have "Sphere", "Cylinder", "Torus", "Plane" "Cuboid" - elementary
geometrys.
"xxx" are cells in a specific Cell-Library.

My efforts are:

to place a cell corresponding to the "PosX"-, "PosY"-,
"PosZ"-Informations
in the database

to scale the cell corresponding to the "ScaleX"-, "ScaleY"-, "ScaleZ"-
Infor-
mations in the Database

to rotate the cell (Orientation in the space originally defined by
vector [0,0,1])
so that the vector [0,0,1]

- this is a imaginairy vector. Vector is used to describe the
orientation of the cell
in the space and is "bonded" on the cell. This vector is _everytimes_
[0,0,1] (!!!) -

will be transformed in vector ["OrX", "OrY", "OrZ"]. Information about
"OrX", "OrY",
"OrZ" is also from the database.


The methode to place the cell on the right position works good.

________________________________________________________________________________
Sub cell()
Dim oOrigin As Point3d
Dim oCell As CellElement
Dim cellName As String

' "Sphere"
cellName = "Sphere"
oOrigin.X = 0#
oOrigin.Y = 0#
oOrigin.Z = 0#

' Search attached cell libraries for named cell
Set oCell = CreateCellElement3(cellName, oOrigin, True)
' Display new element
oCell.Redraw msdDrawingModeNormal
' Add new element to file
ActiveModelReference.AddElement oCell

' "Cuboid"
cellName = "Cuboid"
oOrigin.X = 0#
oOrigin.Y = 0#
oOrigin.Z = 0#

' Search attached cell libraries for named cell
Set oCell = CreateCellElement3(cellName, oOrigin, True)
' Display new element
oCell.Redraw msdDrawingModeNormal
' Add new element to file
ActiveModelReference.AddElement oCell

' "Zylind"
cellName = "Zylind"
oOrigin.X = 0#
oOrigin.Y = 0#
oOrigin.Z = 0#

' Search attached cell libraries for named cell
Set oCell = CreateCellElement3(cellName, oOrigin, True)
' Display new element
oCell.Redraw msdDrawingModeNormal
' Add new element to file
ActiveModelReference.AddElement oCell

' "Torus"
cellName = "Torus"
oOrigin.X = 0#
oOrigin.Y = 0#
oOrigin.Z = 0#

' Search attached cell libraries for named cell
Set oCell = CreateCellElement3(cellName, oOrigin, True)
' Display new element
oCell.Redraw msdDrawingModeNormal
' Add new element to file
ActiveModelReference.AddElement oCell


' "Plane"
cellName = "Plane"
oOrigin.X = 0#
oOrigin.Y = 0#
oOrigin.Z = 0#

' Search attached cell libraries for named cell
Set oCell = CreateCellElement3(cellName, oOrigin,
True)
' Display new element
oCell.Redraw msdDrawingModeNormal
' Add new element to file
ActiveModelReference.AddElement oCell


End Sub
____________________________________________________________________________________


But how to let readout the informations from the database?
Sphere_______ Informations in columns
Cuboid_______ Informations in columns
....


How is it possible to scale the cell and to rotate them conform the
data sets
in the database??
Specially how to make it just after the setting the cell in Design
File.
I would like to perform (set,-> scale,-> rotate ) step by step on
every cells
in the lines of database.


IT WOULD BE GREAT TO RECEIVE SOME IMPULSES ON RIGHT DIRECTION HOW TO
PERFORM
THE DESCRIBED MANIPULATIONS.


I thank you verry much for your attention.

Greetings Alexander

Back to top
Jon Summers
Guest





Posted: Tue Feb 24, 2004 7:24 pm    Post subject: Re: Transformations on Cells from Database Reply with quote

Alexander ...

Quote:
But how to let readout the informations from the database?
Sphere_______ Informations in columns
Cuboid_______ Informations in columns

There's an article about VBA, databases, and MicroStation here:

http://www.msmonline.com/features/default.cfm?objectID=76187237-94B4-4BC6-8C731BF1CC7806B2&method=display
Back to top
Alexander Heide
Guest





Posted: Thu Feb 26, 2004 11:41 pm    Post subject: Re: Transformations on Cells from Database Reply with quote

Jon,

thank you!

It's at repeated time a helpfully answer

Greetings

Jon Summers <j.summers-no@spam-computer.org> wrote in message news:<opr3v2urommzs0s3@news.btconnect.com>...
Quote:
Alexander ...

But how to let readout the informations from the database?
Sphere_______ Informations in columns
Cuboid_______ Informations in columns

There's an article about VBA, databases, and MicroStation here:

http://www.msmonline.com/features/default.cfm?objectID=76187237-94B4-4BC6-8C731BF1CC7806B2&method=display


Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> MicroStation All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB