I'm sorry for this question but i am still new on skill coding.
I'm trying to change the mode of measurement from ruler to distance using the code below but still nothing happened.
leCreateMeasurementForm->type->value="Distance"leCreateMeasurementForm->segSnapMode->value="orthogonal"leCreateMeasurementForm->snapTarget->value="Edges"leCreateMeasurement(geGetEditCellView() list('(0 10) '(10 10)))
What am i missing in my code?
Thank you in advance,
You shouldn't do it by interacting with the form. Instead do:
leSetEnv("rulerDisplayType" "Distance")leSetEnv("rulerSnapTarget" "Points")hiGetCurrentWindow()~>segSnapMode="orthogonal" ; the current window settings are taken rather than the env var valueleCreateMeasurement(geGetEditCellView() list('(0 10) '(10 10))
However, this still doesn't really do what you want, I suspect. The issue is that leCreateMeasurement always creates a ruler rather than the current type (so no "distance" type measurements). CCR 2020116 has been filed for this (you might want to contact customer support to ask for a duplicate to be filed on your behalf). Also, it doesn't do any snapping, so the points you provide as the second argument are the literal list of points you want for the measurement (ruler) and not nearby points to the edges you wish to snap to.
Thank you for your response.
Oh i see. So i need to do it by leSetEnv function.
But i just tried and it seems you are also correct. It is still a "ruler" instead of "distance" type which is what i want.
I'm looking forward to getting a solution to my problem. Please update me here for any development.
Thank you very much for your help.
I'm afraid there is almost zero chance that I can monitor the CCR for when it gets fixed (which may not happen for some time unless there's enough demand for a fix - so far there's one request from 11 months ago), and then remember to come back and post here that it's been resolved. I have a lot of stuff I need to keep track of through customer support and other customer engagements, and updating the forums about each and every request made in the past is not viable (given the thousands of posts I've responded to here). So you should contact customer support as I suggested, and then you can track the CCR yourself through support.cadence.com (and it can even send you a notifier when it's fixed). That's much more sustainable.