Skip to main content
1-Visitor
January 10, 2020
Question

How to put csys or vertex coordinates into the point of the UDF referenceitem with WebLink.

  • January 10, 2020
  • 1 reply
  • 1078 views

Hello!!

 

I'm trying to create a UDF on weblink.

A point of referenceitem is required when creating UDF.

I want to include not only point but vertex (edge-start,end) and csys.

Is there any way??

 

var session = pfcGetProESession();
    var model = session.CurrentModel;
    var selOptions = pfcCreate ("pfcSelectionOptions").Create ("point,edge_end,edge_start,csys");
    selOptions.MaxNumSels = 1;

    pointSel = session.Select(selOptionsvoid null).item(0);
    
    if (pointSel.SelItem.Type != pfcCreate("pfcModelItemType").ITEM_POINT) {
      //??? ★
    }

    var udfInstructions = pfcCreate("pfcUDFCustomCreateInstructions").Create("box");
    
    pointRef = pfcCreate("pfcUDFReference").Create("point"pointSel);
    var refs = pfcCreate("pfcUDFReferences");
    refs.Append(pointRef);
    udfInstructions.References = refs;

 

 

I am not good at English.... I hope you understand my question..

thank you !!

 

1 reply

16-Pearl
January 22, 2020

Hi Cyan

 

I think this Mat post could help you.

 

Best Regards