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

Extracting Dimension from Creo model

Regular Member

Extracting Dimension from Creo model

Hi all,

     I need to get the list of dimension used in the Creo model with reference to specific surface. For example, I have hole feature and i need to get all the dimension with reference to the hole.

Kindly suggest me

10 REPLIES 10

Re: Extracting Dimension from Creo model

Hi Man.

I have the same problem, and want to find a easy to extract dimension from model.

Have got the the solutions? could you share it to me if you got it?

Thank you very much!

Regards.

Roger.

Re: Extracting Dimension from Creo model

Hi You can use

ProSelectionModelitemGet

ProDimensionValueGet.

Re: Extracting Dimension from Creo model

Hi brother,

Thank you so much! Is this function based on toolkit? Can we use it based on vb api? Can you give me a example?

Thanks a lot~

Regards,

Roger.

Re: Extracting Dimension from Creo model

Hi Roger:

Both functions are based on toolkit. I am not sure about VB. Try this code:

ProError err;

double value = 0.0;

ProSelection *sel;

ProDimension dim;

err = ProSelectionModelitemGet (sel[0], &dim);

err = ProDimensionValueGet (dim, &value);

Try this. I think this should do. Let me know how this goes

Regards

Prem

Re: Extracting Dimension from Creo model

For Toolkit you can use ProSolidDimensionVisit to get the dimension from the entire model or ProFeatureDimensionVisit to get the dimension of a specific feature.

For VB API you can try IpfcModelItemOwner.ListItems() or IpfcFeature.ListSubItems(). Check the "Getting ModelItem Objects" section on the user guide.

Those two methods will give you a list of dimension objects(model items). From here you can use the IpfcBaseParameter and IpfcBaseDimension methods to get the informations you need.

The <Creo Load point>\vbapi\vbapi_examples\pfcRelationsExamples.vb file has an example of getting dimension list by using IpfcFeature.ListSubItems()

Re: Extracting Dimension from Creo model

Thanks both Gabriel and Prem,

I will try to test it, thanks a lot!

Regards

Roger.


Re: Extracting Dimension from Creo model

Hello,

Let understand background....API's provided in toolkit or vb are to get the dimensions of the feature created.You can not get dimension on fly w.r.t to one modelitem to other item. But where as in drawing it is very much possible if you can get valid objects to create drawing dimensions in a view.In model you can measure distance between two objects as it has creo features....similary explore API are support on this.

Re: Extracting Dimension from Creo model

Hi Guys,

I want count the current opened drawing attributes list count using VB.net. I have experience in vb.net/api, little bit experience in creo api.

Drawing Attributes:

1. Dimension

2. Note

3. Geom tol

4. 2D datum/axis

5. 2D sketched entity

6. Reference dim

7. Surface finish

8. 2D symbol

The above list count to be taken using vb.net. I have analyzed  vbug.pdf and i didn't' get clear idea. I opened the drawing file.

Now i want to go further process.

Can anyone help me.

Thnks

Balaji somasundaram

Re: Extracting Dimension from Creo model

Follow the below steps:

  1. Connect the Base Session
  2. Get the Current Model as IpfcModel
  3. Cast the IpfcModel as IpfcDrawing
  4. Cast the IpfcDrawing as IpfcModel2d
  5. List out the IpfcModels from IpfcModel2d
  6. Use Every IpfcModel2d as IpfcModelItemOwner
  7. List out the IpfcModelItems
  • Use the IpfcModelType → Here what you need (Dimension, Note, Symbol, etc)
  • Note - you can use Leader Attachment Type

Count the items with your VB Code

Announcements
LiveWorx Call For Papers Happening Now!