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.

setting up a J-Link Model Program

Exception:

New member
I've had some success working with synchronous j-link applications, but only ones that start and close with Pro-E. I'd like to also use Model Programs - ie. tied to specific part models. Specifically, I'd like to be able to pull dimensions out of the solid model (using GetGeomOutline()) and create parameters with those values.

Update:
I now have a working Model Program. However - I don't know how to get a handle to the model that the program is attached to. If I use session.GetCurrentModel it returns a model, but not necessarily the model that the program is attached to. ie. if the model is in an assembly and I open the assembly, GetCurrentModel refers to the assembly and not to the part.
Any ideas?

Thanks
-Jeremy
 
Last edited:
No replies? I've made some progress - I have a program that runs when I open the part it is associated with.

However - I don't know how to get a handle to the model. I can use getProeSession and then getCurrentModel but then if the part is opened as part of an assembly, the model that gets returned is the assembly, not the part. Any ideas? I would think the program should be able to figure out the model its attached to... I can't find it anywhere in the documentation.
 
Have u tried these options?

pfcSession.BaseSession.GetModel
pfcModel.pfcModel.ModelDescriptor_CreateFromFileName

pfcSession.BaseSession.RetrieveModel
pfcSession.BaseSession.RetrieveModelWithOpts
 
Last edited:

Sponsor

Articles From 3DCAD World

Back
Top