|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
reading cartesian coordinates in exponential form....
Hallo all!
Here i am again, with a different problem this time. Any input would be highly appreciated... Please bear with me, first time with visual basic... ![]() Ok my problem is thus, I have to read a STEP file (which is a data exchange format in CAD) and make sense of it all. The problem I am facing is like thus... the file has the following format #3=CARTESIAN_POINT('',(0.E0,0.E0,0.E0)); #4=LINE('',#3,#2); #6=DIRECTION('',(0.E0,0.E0,-1.E0)); Now somehow I have to make the program understand that 0.E0 and etc stands for 0 x 10 power 0, or 0 or -1.E0 standing for -1x10^0 or 1.E2 standing for 100 ie 1x10^2. Is there a way to do this? I am stymied again, my knowledge of VB is really nto that deep at all... I would appreciate any feedback on how it can be done... Thanks all Pete |
|
#2
|
|||
|
|||
|
ah figured it out! maybe its cool to replace them all with
Replace(strArray(i),".E","*10^",1,-1,vbTextCompare) Works to replace 1.E0 with 1*10^0 which is the intent lol now if anyone can help me extract that 1*10^0 and treat it as a number please? Thank you! |
|
#3
|
||||
|
||||
|
it looks as though you're going to have to build a function or class that parses your string and calculates it
__________________
Fisherman "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." - A.Einstein |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > reading cartesian coordinates in exponential form.... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|