Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hello,
I would like to increase or decrease the width of table column based on content into it. My table is repeat region table having BOM details.
Could anyone please help me to know how to achieve the same through toolkit?
I am able to get column width using ProDwgtableColumnSizeGet. I am confused what to do for knowing whether content is fit inside this width or not.
Regards
Ketan
Hi Ketan -
I haven't done this myself, so I can only offer suggestions. If your table contains only ProDtlnote entities, you could try the following for each ProDtlnote in the column:
The release notes for Creo Parametric Toolkit 3.0 state that the accuracy of ProDtlnoteLineEnvelopeGet and its related functions now "provide more accurate results":
The following PTC Creo Parametric TOOLKIT functions provide more accurate results:
• ProDwgtableRowSizeGet()
• ProDrawingTablesUpdate()
• ProDtlnoteLineEnvelopeGet()
• ProNoteLineEnvelopeGet()
Previously, these functions returned results based on inappropriate character size and these results were inconsistent under different conditions.
This may imply that they don't work very well on Creo 2.0 and earlier.
|+| M a r k |+|
Thank you Mark. Unfortunately, I am having Creo 2.0 M090.I would still try this and share results with you.
Thanks and Regards
Ketan
Ketan -
Please do give this a try and report your results here. In the meantime, we might hear from someone else who has already worked on this problem.
Unfortunately, I am having Creo 2.0 M090.
The section I quoted from the Creo 3.0 Parametric Toolkit Release Notes did not specify when ProDtlnoteLineEnvelopeGet was updated, so it's worth trying on Creo 2.0 M090.
Good luck -
|+| M a r k |+|
Hi,
I resumed work today. Could not check this yet but I verified that ProDtlnoteLineEnvelopeGet is available for Creo 2.0 M090. I will share my test results soon.
Thank you once again for this solution.
Regards
Ketan
Hi,
I am able to do call this API and API results are looks okay. Still I am not getting proper results. Below are steps I have followed:
Again stuck to set column width.
Thanks and Regards
Ketan