How to "delete alignment of section with main view" using VB.net

Experimenter
Experimenter

While using solidedge interactively, there is an option by which I can "delete alignment" of a section view created using cutting plane in DFT file. (Please see attached image) By doing this, I can move the section view to any place on the sheet without moving the main source view.

 

How can I achieve this using vb.net ? If i create a section using vb.net and then change its origin by following code, then the main view also moves automatically, which I dont want.

 

SectionView1.setorigin(0,0)

 

 

4 REPLIES

Re: How to "delete alignment of section with main view" using VB.net

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Hi @MangeshC,

use the Unalign() method of the DrawingViews collection.

You have to add the DrawingView objects to the SelectSet before you call the method.

regards

JB
VS2015, SE ST10

Re: How to "delete alignment of section with main view" using VB.net

Experimenter
Experimenter

Thanks JB

 

The problem is partially solved. After doing unalign(), now i can move the sectional views by setorigin method, without affecting the main view. But they can be moved ONLY on top of the main view. If I try to move them somewhere else on the sheet, then again the main view is shifted to that position.

 

I need to move the sectional views at any desired location in the sheet.

 

Regards

Mangesh

Re: How to "delete alignment of section with main view" using VB.net

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Hi @MangeshC,

I created a small test program.

 

This works in my installation:

 drawingViews.Item(1) is the primary view and drawingViews.Item(2) is the section view

 

     ' Get a reference to the DrawingViews collection.
            drawingViews = sheet.DrawingViews
            drawingView1 = drawingViews.Item(1)
            drawingSectionView = drawingViews.Item(2)

            draftDocument.SelectSet.Add(drawingView1)
            draftDocument.SelectSet.Add(drawingView2)

            drawingViews.Unalign()
            drawingView2.SetOrigin(0.3, 0.3)

This moves the section but not the primary view.

regards

JB
VS2015, SE ST10

Re: How to "delete alignment of section with main view" using VB.net

Experimenter
Experimenter
Great @JB it is working fine now Regards Mangesh