Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hi,
I am very new to Creo customization, I was looking to get number of sheets and sheet format of current drawing. I am able to get number of sheets but unfortunately I am not able to get Sheet Format.
Here is the code below
Set conn = asynconn.Connect("", "", ".", 5)
Set session = conn.session
Set model = session.CurrentModel
Set oSheetOwner = model
Dim oSheetallNumber As Long
oSheetallNumber = oSheetOwner.NumberOfSheets
Dim SheetFormat As IpfcDrawingFormat
Set SheetFormat = oSheetOwner.GetSheetFormat(1)
"SheetFormat" does not have any value in this case.
Hi
Although i'm more versed with Creo Toolkit (C language), i had a look to the documentation:
Your code does not return any format. According to the documentation null returned value potentially means that the drawing does not have any format.
Can you make sure of that?
Hi Remy,
Thanks a lot for the reply, but my drawing does have a format. The similar code gives me the expected results when I run it in vb.net. I think there is some issue with the Creo libraries in Excel.
Also sometimes the excel and CREO exit unexpectedly when I run the code. I had a look at this article "https://www.ptc.com/en/support/article/CS356656" but did not find any luck in resolving this issue. Please do share your expertise if you have any information in this matter.
Thanks,
Prasad
Hi you noted that your app works with Creo VB API and fails with EXCEL. You suspect that something is wrong with Creo Libraries in Excel, which is a fair findings.
The article you shared go fruther and informs that
From your message it looks like you tried the workarounds suggested in the resolution.
Like said initially, my expertise lays more with Creo Toolkit (C) than with VB.
If you need further insight, you might want to wait for a Creo VB API expert or file a Creo Toolkit Support case with this url: https://support.ptc.com/apps/case_logger_viewer/cs/auth/ssl/log