Operating System - HP-UX
1832791 Members
3213 Online
110045 Solutions
New Discussion

Re: has anyone successfully run a shell script in Pro-E (or vise versa)?

 
Mark Vollmers
Esteemed Contributor

has anyone successfully run a shell script in Pro-E (or vise versa)?

Hi, all. Not sure if I'll get an answer here, but all the Pro-E areas are useless, and the best minds are here, so here we go...

In Pro-E, there is a mapkey command that I want to run. I can do this fine. the catch is that I want to do this for about 3000 files. what I would like to do is run my script that would

1. open a file (listed alpha-numerically)
2. run mapkey
3. save file
4. close file
5. repeat 1-4 for each file in directory

now, I can combine 2-4 on my own; the hitch comes with #1 and #5. I don't know if this could be done in Pro-e or outside, but I need to step it through each file (a "for i in *" type of thing). the problem that I have is that I can do one iteration in Pro-e, but can't figure out how to automatically open each file successivly. I can also run it outside (in a loop for each part, open pro-e, go to next) but I can't figure out how to pass the mapkey command to run in Pro-e (or the filename either). Does that make sense? Anyway, if anyone has even the wildest suggestions, I'd happily entertain them. Thanks!

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
7 REPLIES 7
Martin Johnson
Honored Contributor

Re: has anyone successfully run a shell script in Pro-E (or vise versa)?

Have you tried putting the file names in a file (one file name to a line) and reading the file?


Marty
Mark Vollmers
Esteemed Contributor

Re: has anyone successfully run a shell script in Pro-E (or vise versa)?

Marty-

I can generate the list, but I don't know how to pass the names to the open file window in Pro-E. it's a gui window, so from within it would look at the name file (names.txt) as a file and not as a list to work through. From outside, I could read the list but don't know how to turn the open file window into a command (i.e. open file.prt) that could be issued in a script and passed from outside into Pro-E and executed.

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
Jeff Schussele
Honored Contributor

Re: has anyone successfully run a shell script in Pro-E (or vise versa)?

Hi Mark,

Unless you can find a command-line mode for Pro/E that can be utilized in a script, I think you're going to be SOL.

Have you looked to see just *what* the mapkey command is doing to the files & think about doing it w/o going into Pro/E?

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Mark Vollmers
Esteemed Contributor

Re: has anyone successfully run a shell script in Pro-E (or vise versa)?

Jeff-

That's my fear, and that'll amount to a fun couple of weeks :(

as to what I want (I don't know if you know pro-e), there are a number of model parameters that need to be designated to be read in Pro-Intralink. I wait until I've got thousands before thinking about doing this, but...

I can see the parameters by looking at the part file in vi, but God only knows what all the numbers mean. It's certainly worth a try; I'll have to play around with it and see if I can track the changes that I'm doing. Maybe I'll get lucky. Thanks!

Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"
Jeff Schussele
Honored Contributor

Re: has anyone successfully run a shell script in Pro-E (or vise versa)?

Yea...all the engs use Pro Engineer at CAT when I worked there. Man could those brainiacs screw up a workstation......
They couldn't understand that putting a 1280x1024 256 color background graphic that was actually about 3'x 4' foot at that res on their 21" console tended to suck all the resources out of the W/S. ;~)
They liked to scroll around the picture......

Jeff

P.S. Seems to me that if you're doing the *same* thing to all the files...the *change* ought to be consistent....Good Luck
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Jeff Schussele
Honored Contributor

Re: has anyone successfully run a shell script in Pro-E (or vise versa)?

Couple of other things....

Make a copy of the file pre-change & just use diff on it & the other post-change. Do that on several files & the change may jump out at you.

Also I know that Pro/E has all kinds of global functions...got any Pro/E *experts* out there that can do more than just draw? Might be able to get Pro/E to do all the work for you by *grouping* the parts & telling Pro/E to do the change on all of 'em. I don't know how many engs you've got out there, but I'll bet you something like this has come up before & onne of the smarter ones has found a "shortcut".

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Mark Vollmers
Esteemed Contributor

Re: has anyone successfully run a shell script in Pro-E (or vise versa)?

well, diff has a real problem with files that have machine-type code in them. all I got was a bunch of beeps and nonsense, and then it turned all my screen characters to junk. oh, well. PTC said that you can't feed pro-e commands, so looks like I'm stuck with manual. bother.


Mark
"We apologize for the inconvience" -God's last message to all creation, from Douglas Adams "So Long and Thanks for all the Fish"