Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Notify server of changes in model

mb720

New member
Hi,

Here's what I'd like to achieve: When our Pro/E users change some parameter of a model (e.g., the size of a screw), a remote server is automatically notified. This notification should happen transparently to the user and should include what in the model has changed.

I'm new to Pro/E and would like to know if I and how I can do this.

Your suggestions are very much appreciated.
 
You can create external protoolkit application which will connect to running proe session and retreive the information from the currently loaded models.To connect ProE session use


ProEngineerConnect()


and to get model modification info use


ProMdlModificationVerify()


There may be some more easy methods , as other experts can suggest them.
 
Thanks Milind for your suggestion.
After some research though I'v decided to go with JLink
to connect with Pro/E.

I use ActionListeners like DefaultSolidActionListener to
get notified of changes.

I am currently able to retrieve all features of a model
using the following code:

Model model =
pfcGlobal.GetProESession().GetCurrentModel();
Features features = ((Solid)
model).ListFeaturesByType(false,
null);

Those features are great to have but I would also like to
know the geometry of the model. I'm talking about the
diameters of circles, the lengths of rectangles, etc.

Does anyone know how to get this data using JLink?

Many thanks in advance.
Edited by: mb720
 
I've had a hard look at exercise 5, its solution and
feature operations but could not see, how that would get me
the measurements/geometry of an object.

Just to be sure that there's no misunderstanding: I would
like to get d7, d8, and d9 (and their corresponding values)
from the cube using JLink.

View attachment 5703
 
One of the Jlink example has following line of code which are used to retreive features dimensions , seems to be something useful for you.


ModelItems FeatureDims = Features.ListSubItems (ModelItemType.ITEM_DIMENSION);
int nDims = FeatureDims.getarraysize ();
String featureName = Features.GetName ();
for (int iDim = 0; iDim < nDims; ++iDim)
{
DimensionHelper dimHelper = new DimensionHelper ((Dimension) FeatureDims.get (iDim));
Double Dim = ((Double) dimHelper.getValue ()).doubleValue ();
}
 
That's it!
smiley32.gif

Thanks a lot Milind, your advice led me to the solution.
What I called geometry is actually called dimensions in
JLink.

Here's the code that gets all the dimensions of a model:
getDimensions()

Best regards and thanks again!
Edited by: mb720
 

Sponsor

Articles From 3DCAD World

Back
Top