Skip to main content
1-Visitor
September 2, 2025
Question

Creoson how to display annotations or dimensions in generated drawing

  • September 2, 2025
  • 4 replies
  • 580 views

I've been trying to use the creoson libraries to pass parameters to a model and generate a drawing from javascript ... but the dimensions in model could not be displayed in the generated drawing.. when i try to do the following,

dimObj = new creo.DimensionObj();
dimObj.name = "d0";
dimObj.showFlag = true;
respdata = await dimObj.list({file:"mydrawing.drw", name:"*"});

it returns a blank array

 

when i try

dimObj.show({file:"mydrawing.drw", name:"d0", show: true});

to show an existing dimension from the model from which i generated the drawing, it reports, the dimension does not exist.. and ofcourse the dimensions are visible in creo when i manually use the "show annotations" toolbar button.. sadly, theres no show annotations interface function in creoson dimension module... any suggestions / help is appreciated

4 replies

Catalina
Community Moderator
September 5, 2025

Hi @CB_14084871 

 

Thank you for your post.

 

Your post appears well documented but has not yet received any response. I am replying to raise awareness. Hopefully, another community member will be able to help.

 

Also, feel free to add any additional information you think might be relevant.

 

Best regards,

Catalina | PTC Community Moderator
8-Gravel
September 8, 2025

Maybe not the cleanest and simple solution, but you could play a mapkey or trail file to do these actions.

=> Show annotations

=> Search for that specific dimension

=> Accept annotation placement

 

I have used the same method in the past and this worked for me.

17-Peridot
September 8, 2025

Pretty sure that this only works for .prt/.asm -- not .drw files.   If you want to show the dimension on the drawing - might consider a mapkey to find and show the dimension, but showing dimensions on drawings is typically view dependent. 

 

Automating drawings is a different head-space.  They are very limited - typically using drawing templates is best for new automations, or placing views and showing the feature dimensions by default - knowing they will go away if the model feature is suppressed.  Either is a more preferred approach for drawings vs tying to show specific dimensions by view using a mapkey or trail file.

 

hope this helps.

 

Dave

8-Gravel
September 9, 2025

No I use it for drawings.

 

It will show the dimesions on the first view where it is possible to show the dimension. 

With this method you do not have a lot of controll on that. 

I use it to automatically generate a drawing and show all the dimensions with tolerances.

(I analyse the ProProgram to find these dimension.)

The user will still need to clean/move the dimensions.

 

Catalina
Community Moderator
September 12, 2025

Hi @CB_14084871,

I wanted to see if you got the help you needed.

If so, please mark the appropriate reply as the Accepted Solution or please feel free to detail in a reply what has helped you and mark it as the Accepted Solution. It will help other members who may have the same question.

Of course, if you have more to share on your issue, please pursue the conversation.

Thanks,

Catalina | PTC Community Moderator