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
Hello
How can I specify the material and unit of the model?
Using the toolkit!
Solved! Go to Solution.
status = ProMaterialfileRead((ProPart)mdl,matl_name);
matl_name should be name of material file...Not the path of material file...
You can traverse to material directory by changing directory using API ProDirectoryChange() .After setting material, you can reset directory as earlier working directory.
What APIs do they perform?
Can you find information on related examples?
It is difficult to search in the API itself and to use the API in which functions.
It is difficult to be sure that the API is the feature I'm looking for, but it does search using protkdoc's html.
thank
Give a try for below :
1. For Material : protkdoc/samples/UgMaterial_c.html#anchor-29
2. For Unit : /protkdoc/samples/UgMaterial_c.html#anchor-29
HIH
-Ketan
I tried the following to change the material, but there is a problem.
It seems unfamiliar to use ProMaterialfileRead..
ProError status; ProMdl mdl; ProName matl_name; ////////////////////////////////////////////////////////// ProMdlCurrentGet(&mdl); ProStringToWstring(matl_name,(char*)"C:\\test"); status = ProMaterialfileRead((ProPart)mdl,matl_name); //////////////////////////////////////////////////////
I've tried the above code, but I get an error.
Can you help me?
status = ProMaterialfileRead((ProPart)mdl,matl_name);
matl_name should be name of material file...Not the path of material file...
You can traverse to material directory by changing directory using API ProDirectoryChange() .After setting material, you can reset directory as earlier working directory.
The material file is read, but no material is specified.
Could you tell me what I need to do to designate the material please?
I knew how to specify the model.
Using ProMaterial, we have declared the model to be materialized and the registered material.
We then used ProMaterialCurrentSet to successfully assign the material to the model.
Can you run Mass Properties in the toolkit?