Hi,
Any one knows if it is possible to have measurement tools available in Paragon, it would be really useful for checking purpose.
/Anh
Hi,
Any one knows if it is possible to have measurement tools available in Paragon, it would be really useful for checking purpose.
/Anh
------------------------------------------------------------------------ -- -- [c] Copyright 2017 to Current Year me_hungry -- -- File: uMeasureInParagon.pmlfrm -- Type: PML Form Definition -- Group: forms -- Keyword: frm -- Module: Paragon -- Replaces: -- -- Author: Yevhen Hisar -- Created: Wed Apr 9 8:42:18 UTC+02:00 2017 -- -- -- Description: -- Measures distance between points -- ------------------------------------------------------------------------ -- setup form !!uMeasureInParagon resize size 20 2 title |Measure distance| path R track |CATACE| call || button .comparecondition |Measure| at xmin form ymin form+0.5 call '!this.runtrack()' width 8 tooltip 'Measure' button .clear |Clear| at xmax.comparecondition+2 ymin.comparecondition call 'AID CLEAR ALL' width 6 tooltip 'Clear' member .ceitemA is dbref member .ceitemB is dbref member .numa is real exit -- ################################## Определение формы ######################################## define method .uMeasureInParagon() if ( Defined(!!MODELVIEW1) ) then if ( !!MODELVIEW1.Shown().Not() ) then $* показать форму, если не показана !!Alert.Error('Works with open MODELVIEW1!') hide !!uMeasureInParagon return endif else !!Alert.Error('Works with open MODELVIEW1!') hide !!uMeasureInParagon return endif col 1 blue col ce yellow col aids red endmethod -- ################################## Задание второго обьекта ######################################## define method .measuredistB() !this.ceitemB = CE endmethod -- ################################## Метод перенаправления подсчетав зависимости от типа точки######################################## define method .comparecondition() !this.MeasureValues() endmethod -- ################################## Метод включенияпривязки с ce ######################################## define method .runtrack() if ( Defined(!!MODELVIEW1) ) then if ( !!MODELVIEW1.Shown().Not() ) then $* показать форму, если не показана !!Alert.Error('Работает при запущенной MODELVIEW1!') hide !!uMeasureInParagon return endif else !!Alert.Error('Работает при запущенной MODELVIEW1!') hide !!uMeasureInParagon return endif -- обнулить все переменные !this.numa = 0 !!uMeasureInParagonnuma = !this.numa !this.ceitemA = Nulref !this.ceitemB = Nulref --перейти на catref !catval = !!MODELVIEW1.compAttribList.dtext[1].after('Category').dbref() $!catval --включить привязку к autorunonce !!uMeasureInParagon.autocall = '!this.autorunonce()' if(!this.numa.eq(0))then prompt 'DEL to exit, Navigate to first Point' endif endmethod -- ################################## Включени поиска точки ######################################## define method .autorunonce() --если элемент точка или п-поинт сет то начать считать (!this.numa = 1) если нет то выполнить autorunonce if(!!ce.type eq 'PTAX' OR !!ce.type eq 'PTSE' OR !!ce.type eq 'PTCA' OR !!ce.type eq 'PTMI' )then !this.numa = !this.numa + 1 !!uMeasureInParagonnuma = !!uMeasureInParagonnuma + 1 else return endif --если по счету первый элемент то выполнить measuredistA если второй то measuredistB + comparecondition + обнулить трек if(!this.numa eq 1)then !this.measuredistB() !this.comparecondition() !this.stop() endif endmethod ------------------------------------------------------------------------ -- -- Method: Stop -- -- Description: Stop -- ------------------------------------------------------------------------ define method .Stop() !!uMeasureInParagon.autocall = '' !this.numa = 0 prompt '' endmethod ------------------------------------------------------------------------ -- -- Method: MeasureValues -- -- Description: MeasureValues -- ------------------------------------------------------------------------ define method .MeasureValues() -- одна и таже точка or ptse if( !this.ceitemB.type eq 'PTSE')then !this.stop() return endif !!ce = !!MODELVIEW1.component -- FIRST SCOM OF CATE handle any return endhandle !bitem = !this.ceitemB.numb -- !PinBPos = P$!bitem POS !PinCPos = X0Y0Z0 !PinBPosE = !PinBPos !PinBPosN = !PinBPos !PinBPosU = !PinBPos !PinBPosE.east = 0 !PinBPosN.north = 0 !PinBPosU.up = 0 ------------------------------------------------- !getMiddlePosE = !PinBPosE.Midpoint(!PinBPos) !getMiddlePosN = !PinBPosN.Midpoint(!PinBPos) !getMiddlePosU = !PinBPosU.Midpoint(!PinBPos) ----------------------------------------------------------- !getDistancePosN = !PinBPosN.Distance(!PinBPos).STRING('D1').replace('-','').replace('mm','') !getDistancePosE = !PinBPosE.Distance(!PinBPos).STRING('D1').replace('-','').replace('mm','') !getDistancePosU = !PinBPosU.Distance(!PinBPos).STRING('D1').replace('-','').replace('mm','') ------------------ var !dirE CONS DIR $!PinBPos TO $!PinBPosE var !dirN CONS DIR $!PinBPos TO $!PinBPosN var !dirU CONS DIR $!PinBPos TO $!PinBPosU var !revE CONS DIR $!PinBPosE TO $!PinBPos var !revN CONS DIR $!PinBPosN TO $!PinBPos var !revU CONS DIR $!PinBPosU TO $!PinBPos -- AID LINE $!PinBPosE TO $!PinBPos LINES DASHED -- AID LINE $!PinBPosN TO $!PinBPos LINES DASHED -- AID LINE $!PinBPosU TO $!PinBPos LINES DASHED if (!getDistancePosE.real().eq(0).not()) then AID TEXT '$!getDistancePosE' AT $!getMiddlePosE AID ARROW AT $!PinBPosE DIR $!revE HEI $!getDistancePosE Prop 0.1 AID ARROW AT $!PinBPos DIR $!dirE HEI $!getDistancePosE Prop 0.1 endif if (!getDistancePosN.real().eq(0).not()) then AID TEXT '$!getDistancePosN' AT $!getMiddlePosN AID ARROW AT $!PinBPosN DIR $!revN HEI $!getDistancePosN Prop 0.1 AID ARROW AT $!PinBPos DIR $!dirN HEI $!getDistancePosN Prop 0.1 endif if (!getDistancePosU.real().eq(0).not()) then AID TEXT '$!getDistancePosU' AT $!getMiddlePosU AID ARROW AT $!PinBPosU DIR $!revU HEI $!getDistancePosU Prop 0.1 AID ARROW AT $!PinBPos DIR $!dirU HEI $!getDistancePosU Prop 0.1 endif endmethod
You can try with this.
It was shared on this Forum a while ago.
Change extension from .txt to .pmlfrm
Thanks Corrado, but the form is not working. And that is not what I need as well, I want something that we can snap and measure as what we do in Design module.
Ok. I apologize.
Anyway the form does work ok.
It returns the distance of a P-Point from the origin.
Ok. I apologize.
Anyway the form does work ok.
It returns the distance of a P-Point from the origin.
Thank you!
I didn't test it on Piping component, but it didn't work on Structural component (ie. Gensec profile).
Yes. It works with P-Points only...
yes, p point to p point distance we can get
hi corrado, i heard that in aveva connect we cannot open paragon and design at a time? is it true? same with aveva engineering configuration and engineering
No. As far as I know it is not true.