How to install tcom package in 64 bit system

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

hi all,

i got an error while iam running the tcl/tk script. i got an error 'package require tcom' not found.can you please help me out in this issue.](*,)

Tagged:

Answers

  • tinh
    tinh Altair Community Member
    edited October 2012

    hi KIRAN

    try to download 64bit version of tcom package (you can search it on Tcl/Tk websites)

    and copy it into the folder .../hw10.0/hw/tcl

    good luck

    rgds,

    tinh

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited December 2012

    I have the same problem, however, I get 'couldn't load library '..../hw/tcl/tcom.tcom.dll': this library or a dependent library could not be found in library path.

    I was able to use the tcom package in a seprate TCL installation (activestate, using teacup to install is), however I need the package to work in Hypermath too. What do I do wrong? (I just downloaded the 64bit tcom, and copied it as mentioned below. I do not have (experiece with) visual basics , C++, etc, just Matlab and Hyperworks, and now a bit tcl)

    >> edit: Ok, using teacup setup and teacup link make I set the repository of the tcl shell in win64/bin to that of the working activestate tcl installation. It seemed to work, howver it only works in the tclsh85 shell itself, but not in hypermath ](*,) why? Apparently, the tcl editor in hypermath is not the same as the tclsh85 shell (running tcl scripts using { tclsh helloworld.tcl } does not work either). who can help me out with this?

  • tinh
    tinh Altair Community Member
    edited December 2012

    Hi

    Please confirm that in folder .../hw/tcl/tcom existing files tcom.dll and tcom.tcl

    pkgIndex will load these file just if they are in same folder

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited December 2012

    Hi, thank you for the answer. tcom.dll and tcom.tcl are indeed the same folder. but, as you can read from my edited post: I got it partially to work. Can you help me resolving this issue?

  • tinh
    tinh Altair Community Member
    edited December 2012

    Hi

    in Hypermath, command window is not used for tcl

    you should use View>>Tcl window

    and if you want to load a package by 'package require'

    you have to set variable auto_path point to the package

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited December 2012

    I know, I use the tcl window in hypermath. But what I came across, is that when I use the shell in tcl/win64/bin/tclsh85.exe, I can evaluate tcl files using 'tclsh mytclfile.tcl'. when I do the same in the tcl window in hypermath, I get:

    Tcl Error : invalid command name 'tclsh85'

    while executing

    'tclsh85 myfile.tcl'

    myfile.tcl only containing: puts 'hello world'

    Furthermor, when I want to use the tcom package is in the shell, this is no problem, while when I want to use it in de tcl window in hypermath, it doesnt work. I have set the auto_path variable pointing to the package. i made it identical to the auto_path of the shell.

    So, what is going wrong?

  • tinh
    tinh Altair Community Member
    edited December 2012

    Hi

    Sorry for my mis-understand above

    I think the tcom 64bit version was not compatible with tcl code in HM

    Someone in tcl community advise us change to use twapi package which support COM

    Did you try this ?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited December 2012

    Hi,

    I don't know anything about twapi, but as soon as I get any result, I'll post it here. Thank you for your reply!

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited December 2012

    Wow, I've spent the past week trying installing tcom, and with twapi, within 2 minutes I got what I needed image/emoticons/default_smile.png' alt=':)' srcset='/emoticons/smile@2x.png 2x' width='20' height='20'>

    So, everyone trying using tcom for COM applications in hypermath: use twapi!

    @tinh: thank you so much for your help!