Loading... <!-- wp:paragraph {"fontSize":"normal"} --> <p class="has-normal-font-size">今天接着上篇继续讲,Label Rule的XML中引入多个Attribute这种方法。还是做带标高的管线号这个例子。</p> <!-- /wp:paragraph --> <!-- wp:spacer {"height":20} --> <div style="height:20px" aria-hidden="true" class="wp-block-spacer"></div> <!-- /wp:spacer --> <!-- wp:paragraph {"fontSize":"normal"} --> <p class="has-normal-font-size"><span class="has-inline-color has-vivid-red-color">1、</span>SharedContent\Drawings\Catalog\Rules\LabelRules中找到Piping Plan_LineNumber_Longest Segment.xml文件,复制修改名字为你的组合属性Label Rule的名字,我这里命名为INGR LineNumber_BOP.xml,同时编辑xml里的内容,将指针指向的Label文件的名字也改为INGR LineNumber_BOP。</p> <!-- /wp:paragraph --> <!-- wp:image {"id":1543,"sizeSlug":"large"} --> <figure class="wp-block-image size-large"><img src="https://mrgeng.com/usr/uploads/2020/06/label-rule-01.jpg" alt="" class="wp-image-1543" style=""></figure> <!-- /wp:image --> <!-- wp:paragraph {"fontSize":"normal"} --> <p class="has-normal-font-size"><span class="has-inline-color has-vivid-red-color">2、</span>进入SharedContent\Drawings\Catalog\Labels\Templates,找到下图两组文件,复制Piping Plan_LineNumber_Longest Segment.sym和Piping Plan_LineNumber_Longest Segment.xml,修改名字为INGR LineNumber_BOP.sym和INGR LineNumber_BOP.xml。</p> <!-- /wp:paragraph --> <!-- wp:image {"id":1544,"sizeSlug":"large"} --> <figure class="wp-block-image size-large"><img src="https://mrgeng.com/usr/uploads/2020/06/label-rule-02.jpg" alt="" class="wp-image-1544" style=""></figure> <!-- /wp:image --> <!-- wp:image {"id":1545,"sizeSlug":"large"} --> <figure class="wp-block-image size-large"><img src="https://mrgeng.com/usr/uploads/2020/06/label-rule-03.jpg" alt="" class="wp-image-1545" style=""></figure> <!-- /wp:image --> <!-- wp:paragraph {"fontSize":"normal"} --> <p class="has-normal-font-size"><span class="has-inline-color has-vivid-red-color">3、</span>打开INGR LineNumber_BOP.xml,找到如下图设置属性的位置,在已有的管线号属性下面添加一行管底标高,引用BopPipePort1.rtp,这样就将两个Label引入到了这个Label Rule。</p> <!-- /wp:paragraph --> <!-- wp:image {"id":1546,"sizeSlug":"large"} --> <figure class="wp-block-image size-large"><img src="https://mrgeng.com/usr/uploads/2020/06/Label-Rule-4-1024x55.jpg" alt="" class="wp-image-1546" style=""></figure> <!-- /wp:image --> <!-- wp:paragraph {"fontSize":"normal"} --> <p class="has-normal-font-size"><span class="has-inline-color has-vivid-red-color">4、</span>双击INGR LineNumber_BOP.sym,在Drawing Editor中打开该文件。第一次打开的时候我们只看到一个Piping Plan_LineNumber_Longest Segment的文字框,复制问个文字框,放到它的下面,修改名字为BopPipePort1,然后右键进入属性界面,修改Value为BopPipePort1。</p> <!-- /wp:paragraph --> <!-- wp:image {"id":1548,"sizeSlug":"large"} --> <figure class="wp-block-image size-large"><img src="https://mrgeng.com/usr/uploads/2020/06/label-rule-05.jpg" alt="" class="wp-image-1548" style=""></figure> <!-- /wp:image --> <!-- wp:paragraph {"fontSize":"normal"} --> <p class="has-normal-font-size"><span class="has-inline-color has-vivid-red-color">5、</span>上下两个文字框可以在Info属性框的坐标、长宽和对齐方式,为了标注的美观,上下我们一般设置成长宽相等,定位上,X相等,Y轴相差一个宽度值,其他对齐方式如下设置。还有一个比较重要的设定,就是原点即<strong><span class="has-inline-color has-vivid-red-color">Symbol Origin</span></strong>,这个会直接影响到我们出图标注时的引线生根点,我们一般会打开PinPoint使用XY坐标值来精确定位,像下面这种两个属性的文字框,如果我们想让引线在左边,我们要将原点定位到他们的左边正中间,这个需要通过两个文字框的定位计算出中点坐标来作为原点的坐标。</p> <!-- /wp:paragraph --> <!-- wp:image {"id":1549,"sizeSlug":"large"} --> <figure class="wp-block-image size-large"><img src="https://mrgeng.com/usr/uploads/2020/06/label-rule-06.jpg" alt="" class="wp-image-1549" style=""></figure> <!-- /wp:image --> <!-- wp:image {"id":1552,"sizeSlug":"large"} --> <figure class="wp-block-image size-large"><img src="https://mrgeng.com/usr/uploads/2020/06/label-rule-07.jpg" alt="" class="wp-image-1552" style=""></figure> <!-- /wp:image --> <!-- wp:paragraph {"textColor":"vivid-red","customFontSize":18} --> <p style="font-size:18px" class="has-text-color has-vivid-red-color">最终的效果如下图:</p> <!-- /wp:paragraph --> <!-- wp:image {"id":1553,"sizeSlug":"large"} --> <figure class="wp-block-image size-large"><img src="https://mrgeng.com/usr/uploads/2020/06/label-rule-08.jpg" alt="" class="wp-image-1553" style=""></figure> <!-- /wp:image --> 最后修改:2025 年 03 月 13 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 如果觉得我的文章对你有用,请随意赞赏