Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Convert VLA-OBJECT IVector
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: Convert VLA-OBJECT IVector (Read 1722 times)
0 Members and 1 Guest are viewing this topic.
FELIX
Bull Frog
Posts: 242
Convert VLA-OBJECT IVector
«
on:
February 01, 2019, 02:17:15 PM »
How to convert "VLA-OBJECT IVector"? Read your content.
Logged
OK.
Gemini
Mosquito
Posts: 6
WWW
Re: Convert VLA-OBJECT IVector
«
Reply #1 on:
February 20, 2020, 07:08:24 AM »
Check here:
http://www.theswamp.org/index.php?topic=38072.msg514709#msg514709
Logged
Rod
Newt
Posts: 185
Re: Convert VLA-OBJECT IVector
«
Reply #2 on:
February 23, 2020, 06:13:05 PM »
Hi Felix,
did you have any luck with this?
From memory the iVector contained a list of numerators and a list denominators that corresponded with degrees minutes and seconds
I copied this directly from the code I already posted
https://www.theswamp.org/index.php?topic=38072.msg592382#msg592382
Code - Auto/Visual Lisp:
[Select]
(
defun
getgpsvalue
(
vectorObj
/
Numlist Denomlist i numerator denominator dms dd
)
(
setq
Numlist
(
getitemfromcollection vectorobj
"Numerator"
)
)
(
setq
Denomlist
(
getitemfromcollection vectorobj
"Denominator"
)
)
(
setq
i
0
)
(
repeat
3
(
if
(
and
(
setq
numerator
(
nth
i Numlist
)
)
(
setq
denominator
(
nth
i Denomlist
)
)
(
not
(
zerop
denominator
)
)
)
;_ end of and
(
setq
dms
(
cons
(
/
(
float
numerator
)
denominator
)
dms
)
)
(
setq
dms
(
cons
0
dms
)
)
)
;_ end of if
(
setq
i
(
1+
i
)
)
)
;_ end of repeat
(
setq
dms
(
reverse
dms
)
)
(
setq
dd
(
getdecimaldegrees dms
)
)
)
;_ end of defun
Cheers, Rod.
Logged
"All models are wrong, some models are useful" - George Box
Rod
Newt
Posts: 185
Re: Convert VLA-OBJECT IVector
«
Reply #3 on:
February 23, 2020, 06:14:59 PM »
This may provide more info
https://docs.microsoft.com/en-us/previous-versions/windows/desktop/wiaaut/-wiaaut-rational
Logged
"All models are wrong, some models are useful" - George Box
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Convert VLA-OBJECT IVector