Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change routing linewidth with NXOPEN

Status
Not open for further replies.

fatdogs81

Mechanical
Sep 22, 2014
22
NX 7.5 / C#(.NET Framework 3.5) / Windows 7 Pro.(X64)

In the non-master mode,
There is a pipe drawing what is made with routing.
How to set separately linewidth for bodyline(outerline) and routingline(innerline)

|-------------------------|
| ----------------------- |
|-------------------------|

RED: Flange, BLUE: Outerline, BLACK: Innerline

I wanna set... RED and BLUE are 'Thick' and BLACK is 'Thin'.

I tried with below code but no result.

Code:
public void OuterLine() [COLOR=#EF2929]//Effected not only outerline but also innerline.[/color]
    {
        component cp = targetPart.Tag;
        ufs.Obj.SetLineWidth(cp.Tag, 1);
    }

public void InnerLine() [COLOR=#EF2929]//Not effected.[/color]
    {
        LineSegmentCollection lsCol = workPart.SegmentManager.LineSegments;
        LineSegment ls;

        IEnumerator iEnum3 = lsCol.GetEnumerator();

            iEnum3.Reset();

        while (iEnum3.MoveNext())
            {
                ls = (LineSegment)iEnum3.Current;
                ufs.Obj.SetLineWidth(ls.Tag, 2);
            }

        ArcSegmentCollection asCol = workPart.SegmentManager.ArcSegments;
        ArcSegment ast;

        IEnumerator iEnum4 = asCol.GetEnumerator();

        iEnum4.Reset();

        while (iEnum4.MoveNext())
        {
            ast = (ArcSegment)iEnum4.Current;
            ufs.Obj.SetLineWidth(ast.Tag, 2);
        }
    }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor