Skip to main content
14-Alexandrite
May 14, 2019
Solved

Vb api Save screen image

  • May 14, 2019
  • 1 reply
  • 3463 views

Hello,

I've made the conection between vb and creo.


Now I need some help to do the following:

 

1st I need to save the screen image to a file *.png to a file

 

2nd If I have an assembly oppened, I need to reed the parameters from the activated part. Not the displayed assembly, but the activated part in the assembly.

 

Any idea of how to do it?

Best answer by Manjunath

@CAD_user wrote:

Hello,

I've made the conection between vb and creo.


Now I need some help to do the following:

 

1st I need to save the screen image to a file *.png to a file

 

2nd If I have an assembly oppened, I need to reed the parameters from the activated part. Not the displayed assembly, but the activated part in the assembly.

 

Any idea of how to do it?


@CAD_user 

for 1st question use option IpfcWindow.ExportRasterImage()

for 2nd question, as per my understanding IpfcBaseSession.GetActiveModel() should give the activated model (but not sure). Once you get the model use IpfcParameterOwner.GetParam()

1 reply

Manjunath1-VisitorAnswer
1-Visitor
May 29, 2019

@CAD_user wrote:

Hello,

I've made the conection between vb and creo.


Now I need some help to do the following:

 

1st I need to save the screen image to a file *.png to a file

 

2nd If I have an assembly oppened, I need to reed the parameters from the activated part. Not the displayed assembly, but the activated part in the assembly.

 

Any idea of how to do it?


@CAD_user 

for 1st question use option IpfcWindow.ExportRasterImage()

for 2nd question, as per my understanding IpfcBaseSession.GetActiveModel() should give the activated model (but not sure). Once you get the model use IpfcParameterOwner.GetParam()

CAD_user14-AlexandriteAuthor
14-Alexandrite
May 29, 2019

That's it.

 

It worked 🙂

1-Visitor
September 9, 2019

Hi,

Could you share the code for exporting as Raster Image? I'm struggling there a bit.

Thanks