Skip to main content
18-Opal
September 10, 2025
Question

Get Drawing Scale for mult. Sheets and Model files

  • September 10, 2025
  • 2 replies
  • 751 views

I'm asking for a work around, because Toolkit will not work proper in the following scenario (my guess).

 

You have ONE Drawing with 2 Models

BOX.PRT is active at sheet 1

and

CYL.PRT is active at sheet 2

 

You get the scale with: ProDrawingScaleGet(drawing,solid,sheet,*scale)

 

If sheet 1 is active, the function  ProDrawingCurrentsolidGet() will return BOX.PRT, and now I have the Drawing, the Solid and the Sheet to get the scale, so far - so good.

But if I activate sheet 2 via Toolkit, ProDrawingCurrentsolidGet() will return BOX.PRT again which is not correct.

 

There is no function to Update the Model Tree. The Drawing tree can be updated but the Model Tree will not reflect the change if I switch to Sheet 2 and display the Model Tree of the CYL.PRT.

 

Do I miss something here, or is there a trick. I tried ProDwgSheetRegenerate, Refresh Wind, Solid Model Tree, Regen and so on. But the call to ProDrawingCurrentsolidGet() will always return the model for the sheet number before changing it. 

 

Does someone has a work around, to get the displayed scale for each sheet of a drawing in this scenario?

2 replies

24-Ruby III
September 10, 2025

Hi,

when working with Creo multimodel drawing, user has to set active model - see Creo 10 picture below. Perhaps there is a method that represents this function. You can ask PTC Support ...

MartinHanak_0-1757507343232.png

 

15-Moonstone
September 10, 2025

Perhaps you could try getting the scale from the view instead of the drawing.  This what I do because I rescale the view that contains sheetmetal flat that is parametric driven.   Our drawings are created in a consistent manner so I can make some assumptions about qty of views, but this may work for you.

 

ProDrawingViewsCollect(p_draw, &views);

for each view:

     ProDrawingViewSolidGet(p_draw, views[view], &solid);

     ProDrawingViewSheetGet(p_draw, views[view], &sheet);

   >>>  logic here to get intended sheet and model  <<<

 

err = ProDrawingViewScaleGet(p_draw, views[viewinc], &VScale);

 

 

RPN18-OpalAuthor
18-Opal
September 10, 2025

Yes, with this I can get the scale, but this may not reflect the value in the title block, and this is the one I would need😩. Worst case is to parse the drawing table 😵💫 at the current sheet.

15-Moonstone
September 10, 2025

Another suggestion:  use the view functions in order identify the solid in the view in sheet 2, then pass that solid to  ProDrawingScaleGet(drawing,solid,sheet,*scale) function you were using 

 

ProDrawingViewsCollect(p_draw, &views);

for each view:

     ProDrawingViewSolidGet(p_draw, views[view], &solid);

     ProDrawingViewSheetGet(p_draw, views[view], &sheet);

   >>>  logic here to get intended sheet and model  <<<

 

ProDrawingScaleGet(drawing,solid,sheet,*scale)