Inventor Assembly Half-Section View

Inventor Assembly Half-Section View

stuart_bassil
Contributor Contributor
2,340 Views
13 Replies
Message 1 of 14

Inventor Assembly Half-Section View

stuart_bassil
Contributor
Contributor

I am trying to create an half-section view of a complex assembly. When I first create the view I can either drag the pointer up and down or I can type in a specific dimension. My question is: Is there a way to edit that dimension once the view has been created?

Accepted solutions (2)
2,341 Views
13 Replies
Replies (13)
Message 2 of 14

CCarreiras
Mentor
Mentor
Accepted solution

Hi!

 

I believe is not possible.

CCarreiras

EESignature

Message 3 of 14

jtylerbc
Mentor
Mentor
Accepted solution

No, that doesn't really seem to be a value that is stored by Inventor.  You just re-create the section and enter the new value.  

Message 4 of 14

stuart_bassil
Contributor
Contributor

Thanks. I suspected as much but I thought I'd ask the question in case I was missing something.

0 Likes
Message 5 of 14

mluterman
Advisor
Advisor
For complicated sections, I do a sketch, split it and then derive it (the section I want to look at) into a separate .ipt; this way you can control that dimension. Yes, it's a separate file, but it will update with the sketch and you're only limited by your imagination, not just some orthogonal cut lines.
Message 6 of 14

Bert_Bimmel
Advocate
Advocate

You're right: The face you pick and the offset-value you type are completely volatile: What remains in memory is a dumb fixed plane defining the slice. In the DesignViewRepresentation that may be saved to the file there is no offset stored either, nor does it contain any referencekey to the picked face.

 

Your best shot would probably be to get the sectionplane-data from the API, and translate its root point by a multiple of its normal:

Sub MoveSectionViewPlane(Offset As Double)

    Dim SectViewPlane1 As Plane
    Dim SectViewPlane2 As Plane
    Dim SectionType As SectionViewTypeEnum
    
    Dim NewSectPlaneRootPt As Point
    Dim NewSectionPlane As Plane
    Dim SectPlaneNormal As Vector
    
    Call ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager.ActiveDesignViewRepresentation.GetSectionViewInfo(SectionType, SectViewPlane1, SectViewPlane2)
    
    Set NewSectPlaneRootPt = SectViewPlane1.RootPoint.Copy
    Set SectPlaneNormal = SectViewPlane1.Normal.AsVector
    Call SectPlaneNormal.ScaleBy(Offset)
    Call NewSectPlaneRootPt.TranslateBy(SectPlaneNormal)
    Set NewSectionPlane = ThisApplication.TransientGeometry.CreatePlane(NewSectPlaneRootPt, SectViewPlane1.Normal.AsVector)
    
    Call ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager.ActiveDesignViewRepresentation.SetSectionView(SectionType, NewSectionPlane, SectViewPlane2)


End Sub

 (This is for a half section view only, but it might inspire you to adapt it to some quarter section view if needed)

Message 7 of 14

dusan.naus.trz
Advisor
Advisor

I found something. I tried to use it and it doesn't work. He writes about SendKeys there. Is it possible to use this in iLogic?

 

https://adndevblog.typepad.com/manufacturing/2012/06/run-half-section-view-command-in-assembly-throu...

0 Likes
Message 8 of 14

CCarreiras
Mentor
Mentor

I believe it's possible.

If you can ask the Inventor to create a section in an existent plane, and you can also change the plane offset (previously), this could be a nice workaround to create a "dynamic" section view.

 

I would create a ilogic form to insert the plane offset and a button to run the section view command...

CCarreiras

EESignature

0 Likes
Message 9 of 14

Bert_Bimmel
Advocate
Advocate

Apparently you haven't read (or understood) my previous post. Inventor "forgets" the plane you've picked as soon as you apply your section view.

 

Anyway, the proposed solution from my post above has become obsolete when Autodesk has implemented this by themselves somewhere between 2020 and 2024.

This is one of the rare cases where I must admit, that they have come up with a GOOD solution: Now you can not just move, but even TURN your section view plane.

 

So, unless you want to stay with an earlier Version of Inventor (which i can totally understand), your problem IS solved.

 

0 Likes
Message 10 of 14

dusan.naus.trz
Advisor
Advisor

@Bert_Bimmel  Now the question is how to connect iProperty OFFSET to SendKeys?

info

What is the thought or intention? Why do users want this functionality? Explanation: I'm trying iLogic with Measure. I am able to get the Measure into the iProperty, but I don't know how to get the SendKeys. I've tried it through setting planes and offsets and it's too complicated. If I could get into Senkeys it would solve a lot, because I would measure through iLogic and I would immediately have a half cut at the Measure location.

2024-03-06_10h55_11.png

0 Likes
Message 11 of 14

CCarreiras
Mentor
Mentor

@dusan.naus.trz , i suggest you open a new tread in a  in inventor iLogic forum.
There will be there more capable people to help you on this, for sure.

BTW... My idea was about an offset for a work plane already existent, not directly in the section tool.
After placing the plane with a selected offset, the half section tool selects that plane to section the part.

CCarreiras

EESignature

0 Likes
Message 12 of 14

Bert_Bimmel
Advocate
Advocate

I still don't get your desired workflow.

Do you want to send ctrl-c to capture something from your Measure-Dialog and use it somewhere later in your code, or what?

 

Anyway, SendKeys seems to be a member of VBA and is as easy to use as it appears useless to me: my suggestion won't work, 'cause either...

as soon as you start the macro via UI-Button the text that you have marked for capturing loses focus and nothing will be captured, or...

when you have assigned a keyboard-shortcut to your macro, it won't run as long as something is marked for beeing captured.

If you though still insist on having some similar functionality in iLogic, i guess you'll have to use some WinAPI-functions.

LMGTFY:

Already been here

https://forums.autodesk.com/t5/inventor-forum/sendkeys-or-keystrokes-using-ilogic/td-p/3346779

?

😉

 

0 Likes
Message 13 of 14

dusan.naus.trz
Advisor
Advisor

Iam getting this error: for iLogic

Rule compilation errors in: Custom_Half_Section_View, in: Assembly1.iam Error on line 4: The SendKeys type is not declared and is likely to be inaccessible due to the protection level.

ThisApplication.CommandManager.ControlDefinitions.Item("AssemblyHalfSectionViewCmd").Execute2(True)

'Public Sub TestSendKeys()
SendKeys ("{20}")
'End Sub
0 Likes
Message 14 of 14

Bert_Bimmel
Advocate
Advocate

What I've just said:

"The SendKeys type is not declared..."

In other Words "I (iLogic) have no clue what "SendKeys" is!"

-> Its availlable in VBA, not in iLogic. You'll probably have to use PostMessageA from user32.dll instead.

0 Likes