Skip to main content
10-Marble
December 3, 2022
Solved

Create drawing dimension with web.link

  • December 3, 2022
  • 2 replies
  • 2685 views

Hi everyone, we wanna develop a function whitch would auto create a dimension to represent the length of specific edge in drawing mode. I found a few descriptions in web.link user guide.

 

"The method pfcEmptyDimensionSense.Create() creates a new
dimension sense associated with the type DIMSENSE NONE. The sense field is
set to Type In this case no information such as location or direction is needed to
describe the attachment points. For example, if there is a single attachment which
is a straight line, the dimension is the length of the straight line."

 

There comes two question. First, is there supported API to get every edge's length so we could make comparison to find out the longest edge. Second, if we could find the longest one, is there some snipped code could be refereced  to really build up the dimesion like below ?

 

Creo_Dimension.jpg

 

 

Best answer by Andy.Hsieh

Finally, we use toolkit to solve this problem.

2 replies

10-Marble
March 19, 2023

Does anyone has the direction to develope this function ? I'm really stuck...

17-Peridot
March 21, 2023

First, is there supported API to get every edge's length so we could make comparison to find out the longest edge.

dimesion like below ?

Read chapter "Geometry Evaluation" in the weblink documentation weblinkug.pdf. And "Evaluation of Curves and Edges"

 


is there some snipped code could be refereced  to really build up the dimesion like below ?

Search CreateDrawingDimension in ...\Common Files\weblink\weblinkexamples\jscript\pfcDrawingExamples.js

Andy.Hsieh10-MarbleAuthorAnswer
10-Marble
March 21, 2024

Finally, we use toolkit to solve this problem.