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
»
.NET
»
Topic:
Getting autocad vertical information
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: Getting autocad vertical information (Read 1506 times)
0 Members and 1 Guest are viewing this topic.
sdunn
Newt
Posts: 90
Getting autocad vertical information
«
on:
January 20, 2016, 06:43:57 PM »
I am looking for an automated way in .net to obtain the service pack version of Civil 3D 2013 and newer.
I found where I can get the application version but not the service pack information. Am I limited to searching the registry?
Logged
sdunn
Newt
Posts: 90
Re: Getting autocad vertical information
«
Reply #1 on:
January 25, 2016, 07:29:45 PM »
Thanks to Jeff for this:
http://forums.autodesk.com/t5/autocad-civil-3d-customization/find-the-current-service-pack-version-of-civil-3d/td-p/6000264
I came up with something in lisp that works for 2015.
Code - Auto/Visual Lisp:
[Select]
(
defun
c:getinfo
(
)
(
vl-load-com
)
(
cond
(
(
setq
wscript
(
vlax-create-object
"WScript.Network"
)
)
(
setq
pcname
(
vlax-get-property
wscript
"ComputerName"
)
pcdom
(
vlax-get-property
wscript
"UserDomain"
)
pcuser
(
vlax-get-property
wscript
"UserName"
)
)
(
vlax-release-object
wscript
)
)
)
; cond
; get civil 3d service pack info from registry
(
setq
reg
(
strcat
"HKEY_LOCAL_MACHINE
\\
"
(
vlax
-
machine
-
product
-
key
)
)
)
(
setq
reg
(
strcat
(
substr
reg
1
)
"
\\
Service Packs"
)
)
(
setq
reg
(
strcat
reg
"
\\
"
(
car
(
vl-registry-descendents
reg
)
)
)
)
(
setq
PatchTitle
(
vl
-
registry
-
read
reg
"PatchTitle"
)
)
(
setq
Release
(
vl
-
registry
-
read
reg
"Release"
)
)
; Get ram using doslib
(
setq
maj
(
itoa
(
atoi
(
getvar
"acadver"
)
)
)
)
(
setq
dls
(
strcat
"doslib"
maj
".arx"
)
)
(
setq
res
(
dos_mem
)
)
(
setq
mem
(
rtos
(
nth
1
res
)
2
0
)
)
(
setq
memgb
(
/
(
read
mem
)
1048576
)
)
(
mapcar
'
princ
(
list
"
\n
Computername: "
pcname
"
\n
User domain: "
pcdom
"
\n
User name: "
pcuser
"
\n
Service Pack: "
PatchTitle
"
\n
Release: "
Release
"
\n
Total Physical Memory: "
memgb
)
)
(
princ
)
)
Logged
huiz
Swamp Rat
Posts: 919
Certified Prof C3D
Re: Getting autocad vertical information
«
Reply #2 on:
January 26, 2016, 03:33:09 AM »
Gile wrote an excellent function to find information about installed versions:
http://www.theswamp.org/index.php?topic=31867.msg538136#msg538136
Maybe that will help you.
Logged
The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
.NET
»
Topic:
Getting autocad vertical information