cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Scripting in PRO-E

ptc-4888566
1-Newbie

Scripting in PRO-E

Hi,

Can we use scripts to create geometries in PRO-E ?

say i need to create 10 identical cylinders of given diameter and length ... the task being to position them in space and with a particular orientation , so their position(center of the cylinder) and orientation with x axis are the parameters , i need to code ..

can we write a script for this with loops etc ??

thanks...


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
3 REPLIES 3

With J-link and / or the VB-api you most certainly can do this...

I have no experience with it however...

indeed, these API's will be your best option to achieve this.

VB API is in visual basic (use Visual Studio)

JLink is in Java ( I use Eclipse)

The difference is if you want to start your coded application from within ProE (use JLink) or from outside ProE (use VB)

Both API's are in the standard installation

Good luck!

You can actually perform this without using JLink or the Visual Basic API. If you have some imagination and knowledge of mapkeys, you can write this kind of thing in Perl or python. You could probably write a script driven by a webpage running Javascript. You could also probably do something like this with a DOS script.

The key is to distill the commands you need down into their simplest form and use one of those programming languages to create a script. Creo or Pro/E then executes that script as a Trail File. This, in turn, creates your geometry.

In the mid-1990's I wrote an incredibly complex series of perl scripts to perform all sorts of modeling tasks in Pro/E and that was way back in the "early days" of the software. You can certainly perform these same tasks faster and better using today's modern programming languages. You'll probably have a better shot using scripting languages other than the JLink, Weblink, or VB API's provided with Creo. Those can be tricky for novices. Scripting is pretty straightforward and it can be easier to get a simple script to execute than a more complex API-based solution.

Thanks!

-Brian

Top Tags