HCMD Tool Developer

   5777   20   3
User Avatar
Member
759 posts
Joined: April 2014
Offline
Hi, I have a few questions for the person at SideFX in charge of HCMD.exe within Houdini ?
【T】【C】【S】
User Avatar
Staff
4432 posts
Joined: July 2005
Offline
You should just ask your question here. If possible, someone qualified will answer.
User Avatar
Member
759 posts
Joined: April 2014
Offline
I'm hoping that whomever is in charge development wise of HCMD can add command line options/parameters; if they don't already exist ?
【T】【C】【S】
User Avatar
Staff
4432 posts
Joined: July 2005
Offline
What sort of command line options? What are you trying to accomplish?

The hcmd “application” (it does so little I hesitate to call it an application) just sets some environment variables and starts “cmd.exe” (the Windows Shell). I'm really not sure what you might want to accomplish with command line options that you couldn't accomplish just as well with a batch script?
User Avatar
Member
636 posts
Joined: June 2006
Offline
Whats your requirement? Or what do you want todo?

Maybe Hython can help depending on your requirement.
User Avatar
Member
636 posts
Joined: June 2006
Offline
Whats your requirement? Or what do you want todo?

Maybe Hython can help depending on your requirement.
User Avatar
Member
759 posts
Joined: April 2014
Offline
I want to access all of the commands within HCMD strictly in PowerShell.
【T】【C】【S】
User Avatar
Member
636 posts
Joined: June 2006
Offline
what type of commands do you need? or whats your target for using powershell?
User Avatar
Staff
4432 posts
Joined: July 2005
Offline
Just run hcmd, and at the prompt type “powershell”, and you're running powershell with all the Houdini apps in your PATH…
User Avatar
Member
759 posts
Joined: April 2014
Offline
mtucker
Just run hcmd, and at the prompt type “powershell”, and you're running powershell with all the Houdini apps in your PATH…
What about vise versa ?
【T】【C】【S】
User Avatar
Staff
4432 posts
Joined: July 2005
Offline
I'm at a loss trying to figure out what “vice versa” might mean in the context of what I wrote… Please explain?
User Avatar
Member
759 posts
Joined: April 2014
Offline
mtucker
I'm at a loss trying to figure out what “vice versa” might mean in the context of what I wrote… Please explain?
I mean instead of accessing PowerShell within HCMD; access HCMD within PowerShell ?
【T】【C】【S】
User Avatar
Staff
4432 posts
Joined: July 2005
Offline
Sure, you can start hcmd from within powershell, but I assume what you want is to start hcmd within powershell and “remain” in powershell. In which case you can run “hcmd /c powershell”.
User Avatar
Member
759 posts
Joined: April 2014
Offline
mtucker
Sure, you can start hcmd from within powershell, but I assume what you want is to start hcmd within powershell and “remain” in powershell. In which case you can run “hcmd /c powershell”.
hconfig : The term ‘hconfig’ is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ hconfig -a
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (hconfigtring) , CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
【T】【C】【S】
User Avatar
Staff
4432 posts
Joined: July 2005
Offline
I suspect there has been some sort of miscommunication here. Certainly if I start powershell and type:

PS C:\Users\mtucker> hconfig -a
hconfig : The term 'hconfig' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ hconfig -a
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (hconfig:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

But I can only assume you didn't run “hcmd /c powershell” as I suggested. Because within a powershell window I can do:
PS C:\Users\mtucker> cd 'C:\Program Files\Side Effects Software\Houdini 16.5.252\bin'
PS C:\Program Files\Side Effects Software\Houdini 16.5.252\bin> .\hcmd /c powershell
Welcome to the Houdini 16.5.252 command line tools.
The Houdini environment has been initialized. [Windows 10.0.10586]
Starting command prompt...
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS C:\Program Files\Side Effects Software\Houdini 16.5.252\bin> hconfig -a
EDITOR := '<not defined>'
FPS := -1
HFS := 'C:/PROGRA~1/SIDEEF~1/HOUDIN~1.252'
.....

In other words I am still in powershell, and I have access to all the Houdini binaries. If I have understood correctly, this is what you've been trying to accomplish. If not, please explain again what you're trying to do. And if my above instructions don't work for you, please give a similar step by step playback of what you are doing and where it's going wrong. Use the [code][/code]markup in your message to display the formatted output like I did here for readability.

Thanks,
Mark
User Avatar
Member
759 posts
Joined: April 2014
Offline
Hi Mark, I can run HCMD with the following command
.\hcmd /c powershell
from within the path of HCMD but not
"hcmd /c powershell"
from within the path of HCMD; although I'm going to dig into this as to why.
【T】【C】【S】
User Avatar
Staff
4432 posts
Joined: July 2005
Offline
The current directory isn't necessarily part of your PATH, so powershell may not look in the current directory for hcmd if you run it as “hcmd” instead of “.\hcmd”.
User Avatar
Member
759 posts
Joined: April 2014
Offline
Hi, what is the “./” ?
【T】【C】【S】
User Avatar
Staff
4432 posts
Joined: July 2005
Offline
It means “look in the current directory”.
User Avatar
Member
7024 posts
Joined: July 2005
Offline
Thanks for the explanation Mark, as a fairly neophyte Windows user, could I please RFE hpowershell.exe that allows direct access of Houdini via Powershell? I can use these steps of course, but given Powershell is much stronger than cmd.exe it would convenient to have it available for every Houdini version (we run quite a few) in the Start Menu.

Cheers,

Peter B
  • Quick Links