Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to get hardware information ?

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
451 Views, 2 Replies

how to get hardware information ?

Hello to all
Can any one help me : how to get hardware information using autoisp (visual lisp) ?

thanks
2 REPLIES 2
Message 2 of 3
patrick_35
in reply to: Anonymous

Hi

An example

(defun c:info(/ item meth1 meth2 process wmi)
(defun lister(val / it)
(vlax-for it val
(princ (strcat "\n" (vlax-get it 'name) " : "))
(if (vlax-get it 'value)
(princ (vlax-get it 'value))
(princ "Nil")
)
)
)

(vl-load-com)
(setq WMI (vlax-create-object "WbemScripting.SWbemLocator")
meth1 (vlax-invoke WMI 'ConnectServer nil nil nil nil nil nil nil nil))
(foreach process (list "BIOS" "Processor" "VideoController" "SoundDevice" "CDROMDrive" "OperatingSystem" "ComputerSystem" "PhysicalMemory" "DiskDrive")
(setq meth2 (vlax-invoke meth1 'ExecQuery (strcat "Select * from Win32_" Process)))
(princ (strcat "\nCaractéristiques " process " :"))
(vlax-for item meth2
(lister (vlax-get item 'Properties_))
(lister (vlax-get item 'Qualifiers_))
(getkword "\nAppuyez sur entrée pour continuer...")
)
)
(mapcar 'vlax-release-object (list meth1 meth2 wmi))
(princ)
)


@+
Message 3 of 3
Anonymous
in reply to: Anonymous

THANK YOU Patrick_35 !!!

:)))


You are SUPER BOY!!!!

THANK YOU again!!!!

I am be obliged to you!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost