Skip to main content
10-Marble
Dec 3, 2022 6:37 PM UTC
Solved

Create drawing dimension with web.link

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

 

 

10-Marble
Mar 21, 2024 1:27 PM UTC

Finally, we use toolkit to solve this problem.

3 replies

10-Marble
Mar 19, 2023 4:57 PM UTC

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

Translate
17-Peridot
Mar 21, 2023 11:58 AM UTC

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

Translate
Andy.Hsieh10-MarbleAuthorAnswer
10-Marble
Mar 21, 2024 1:27 PM UTC

Finally, we use toolkit to solve this problem.

Translate