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

HOW TO GET THE LENGTH AND WIDTH OF A SHEETMETAL PART AFTER FLAT PATTERN - USING VB-API OR J-LINK?

SOLVED
Highlighted
Amethyst

HOW TO GET THE LENGTH AND WIDTH OF A SHEETMETAL PART AFTER FLAT PATTERN - USING VB-API OR J-LINK?

Hello All,

I am working on a Customization project to calculate the Scrap percentage of a sheet metal part and Listing all features. But i am not able to pull the total length and width of the part after flat pattern operation automatically.

I am able to pull the thickness of the part from CREO but is there any way i can get the total length and width of the part after flat pattern.

 

Note :

When i am creating a new sheet metal part in CREO-3.0 after doing Flat Pattern. I saw that 2 Restricted Parameters are getting created which is listing the Total length & width. Is it possible to pull these 2 values.

 

Using the option Flat Pattern Preview i am able to see the values but i cant get hold on to those.

 

Any Suggestion will be very helpful.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: HOW TO GET THE LENGTH AND WIDTH OF A SHEETMETAL PART AFTER FLAT PATTERN - USING VB-API OR J-LINK

For older models I'd look at IpfcSolid.GeomOutline() or IpfcSolid.EvalOutline() methods where IpfcSolid refers to the flat state of the part (or the flat patern instance if is available).

Either of those functions will give you an array of 2 points representing the extremities of the part. The EvalOutline method has the option to ignore non-geometric features (points, curves, etc).

View solution in original post

4 REPLIES 4
Highlighted

Re: HOW TO GET THE LENGTH AND WIDTH OF A SHEETMETAL PART AFTER FLAT PATTERN - USING VB-API OR J-LINK

The flat pattern parameters (SMT_FLAT_PATTERN_WIDTH and SMT_FLAT_PATTERN_LENGTH) are feature parameters. What that means is that the "owner" of the parameter is the flat pattern feature.

For VB-API you can use IpfcSolid.GetFeatureById() or IpfcSolid.GetFeatureByName() to get the feature handle.

Next you use IpfcParameterOwner.GetParam() to get the parameter handle. This method takes as input the parameter name. From here you can get the value of the parameter as a double precision number.

Highlighted

Re: HOW TO GET THE LENGTH AND WIDTH OF A SHEETMETAL PART AFTER FLAT PATTERN - USING VB-API OR J-LINK

Hi Gabrial,

 

Thanks for the reply. What ever you told i already tried it up and its working perfetly for a new sheet metal part which i am creating in CREO-3.0. 

But the problem what i am facing is. I have many sheet metal items which is too old there if i am trying to acess this parameter i am not getting proper value its always showing 0.0

 

Please see the attached image's?

Newly created part .

SM_NEW_PART.PNG

 

Old Model.

SM_OLD_PART.PNG 

Highlighted

Re: HOW TO GET THE LENGTH AND WIDTH OF A SHEETMETAL PART AFTER FLAT PATTERN - USING VB-API OR J-LINK

For older models I'd look at IpfcSolid.GeomOutline() or IpfcSolid.EvalOutline() methods where IpfcSolid refers to the flat state of the part (or the flat patern instance if is available).

Either of those functions will give you an array of 2 points representing the extremities of the part. The EvalOutline method has the option to ignore non-geometric features (points, curves, etc).

View solution in original post

Highlighted

Re: HOW TO GET THE LENGTH AND WIDTH OF A SHEETMETAL PART AFTER FLAT PATTERN - USING VB-API OR J-LINK

Hi  @GabrielZaha

 

So sorry for the late reply, and Thanks a lot for this solution. 


With Regards

Aghil

Announcements