Creating section views on drawing by ilogic rule, inventor 2021

Creating section views on drawing by ilogic rule, inventor 2021

malmal02122023
Advocate Advocate
450 Views
5 Replies
Message 1 of 6

Creating section views on drawing by ilogic rule, inventor 2021

malmal02122023
Advocate
Advocate

Hello,

 

I would like to create sections view A-A to H-H for frame by Ilogic rule as shown below. Could you help me please?

The code given below see attachment. In this code, a section is created by a sketch placed in the center of the main view. Is it possible to place a sketch on the selected working plane by previously selecting working plane? In the model working plane were created and named by number 1, 2 itp.
Thanks for advice.


 

malmal02122023_0-1704987598431.png

 

0 Likes
451 Views
5 Replies
Replies (5)
Message 2 of 6

A.Acheson
Mentor
Mentor

Hi @malmal02122023 

You would need to include the plane, draw a sketch line, constrain the line, dimension the line and then add the view. Attach your attempt and indicate what your having trouble with. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 3 of 6

malmal02122023
Advocate
Advocate

Hello,

 I have a question about how to rewrite the code so that the section sketch is placed on the work plane, that I select in advance?

  1. Select a work plane located in the model (there are named by 1, 2 itp.)
  2. Create a sketch on the main view along the work plane
  3. Creating a section

 Best regards

0 Likes
Message 4 of 6

A.Acheson
Mentor
Mentor

Hi @malmal02122023 

If you follow along the manual steps to create a section view you will notice a sketch is placed not on the workplane but on the view, the geometry is selected/drawn to create the section line and the view is generated from this sketch line. 

 

Here is the API sample to add a sketch to a view and draw a line. Written in VBA so convert as necessary. Post if you have issues. This is your first step. 

 

Here is an article on how to include the workplane of the model in the drawing. Found using search term "ilogic include workplane in drawing" in the internet browser.

 

Here is an article on how to add a line to a sketch.

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 5 of 6

Curtis_Waguespack
Consultant
Consultant
Message 6 of 6

malmal02122023
Advocate
Advocate

Hello,

 

Thank you for useful link.

I understand that the code shown below draws a line on the base view relative to its center.

Ana I have a question:

How can  build a line relative to the work plane located in the model and named ''1''.

 

Dim SectionPoint_L As Point2d = oTG.CreatePoint2d(Left_X, oBaseView.Center.Y)
	Dim SectionPoint_R As Point2d = oTG.CreatePoint2d(Right_X, oBaseView.Center.Y)
	Dim SheetPoint_L As Point2d = SectionSketch.SheetToSketchSpace(SectionPoint_L)
	Dim SheetPoint_R As Point2d = SectionSketch.SheetToSketchSpace(SectionPoint_R)
	Dim SketchLine As Inventor.SketchLine = SectionSketch.SketchLines.AddByTwoPoints(SheetPoint_L, SheetPoint_R)

 

Thanks for advice

0 Likes