Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
hey
I am using Creo 2.0 (Date Code M120) with TK/OTK.
In sample applications I found in the internet you can select a feature (via ProSolidFeatVisit()) and in return you'll get a model and information about the feature.
I would like to visit all of the components/elements/features (whatever the modules a model is build of are called) and retrieve all the information without any user interaction.
Basically I want to:
Any Ideas?
regards,
Luis Güthle
Solved! Go to Solution.
You can also use :
- ProMdlDependenciesList in a loop with C++ vektor or Map (e.g. Hashmap) would be good
- Filter out whats the right ones you wanna get (ProMdlTypeGet()) you can directly make search through your C++ vektor or reversive function with the hasmap (whats better for you to handle)
- ProSolidDimensionVisit inside a for loop run through all dimensions and get the informations you want
I think about something like this :
pushCurrentModelInVektor
for (int i = 0; i < vector.length; i++) {
if (ProMdlType(vector.at(i)) == ASM) {
if (model not in vector) vector.add(submdl);
}
}
for (int i = 0; vector.length; i++) {
if (ProMdlType(vector.at(i)) == PRT) {
ProSolidDimensionVisit(vector.at(i));
}
}
Br,
Eike
To be more specific:
So if I got a *asm file I imagine I have to visit all *.prt inside the asm and inside the *.prt all the elements wich consist of dimensions?!
I found an example: "..\protoolkit\protk_appls\pt_examples\pt_dbase\TestDimension.c" .."ProTestFeatureDimensionsCollect()" seems like a promising function.. I am trying to get this work for my own code..
Hi all,
Luis, search source code in toolkit examples for ProUtilAsmTraverse function. It is defined somewhere in UtilVisit.c ( don't remember exact file name).
HIH.
Feliks.
You can also use :
- ProMdlDependenciesList in a loop with C++ vektor or Map (e.g. Hashmap) would be good
- Filter out whats the right ones you wanna get (ProMdlTypeGet()) you can directly make search through your C++ vektor or reversive function with the hasmap (whats better for you to handle)
- ProSolidDimensionVisit inside a for loop run through all dimensions and get the informations you want
I think about something like this :
pushCurrentModelInVektor
for (int i = 0; i < vector.length; i++) {
if (ProMdlType(vector.at(i)) == ASM) {
if (model not in vector) vector.add(submdl);
}
}
for (int i = 0; vector.length; i++) {
if (ProMdlType(vector.at(i)) == PRT) {
ProSolidDimensionVisit(vector.at(i));
}
}
Br,
Eike
You gave perfect solution but there is another workaround for above problem.
Here I write another approach for same
Step 1: Get Current Handler using ProMdlCurrentGet()
Step 2: Visit Model Tree using ProSilidVisit()
Step 3: Filter for Part and Asm using ProMdlType()
Step 4: Now Visit ProSolidDimensionVisit() and write into text
Nikhil Daslaniya schrieb:
Step 2: Visit Model Tree using ProSilidVisit()
I only found "ProSolidVisitAction" in TK docu.. and it refers to ProDrawingSolidsVisit which is for drawings?