How to do Zoom process for Constraint placed in Assembly for VBA Project.

How to do Zoom process for Constraint placed in Assembly for VBA Project.

Anonymous
Not applicable
696 Views
4 Replies
Message 1 of 5

How to do Zoom process for Constraint placed in Assembly for VBA Project.

Anonymous
Not applicable

Dear Friends,

          We need to create new project for Inventor-2018.

          In this project we need to zoom the particular constraint created in the assembly.

          Constraint Type: Example :Flush Constraint.

          Due to process problem is part1 is more extend from part2, When doing Flush Constraint process.

          We want to Zoom Out the particular extended parts in the constraints.  

          We don't know how to zoom particular constraint on coding(VBA).

         

With Regards,

      Vicky.

 

0 Likes
Accepted solutions (1)
697 Views
4 Replies
Replies (4)
Message 2 of 5

clutsa
Collaborator
Collaborator

I'm sorry, I'm having a hard time understanding the question. Do you want to make a constraint and the parts start to far apart to find? Do you want to find two parts that are already constrained? Can you clarify the issue or post some screen shots or a screen capture to help.

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes
Message 3 of 5

Anonymous
Not applicable

Dear Clutsa,

     Thanks for your quick reply.

     I hereby attached sample .iam and .ipt files with snap shot.

     I need zoom like a below snap shot using VB.net coding. 

 

Capture.PNG

       I was already mention Constraint with red box in above snap.

       Kindly please check attached file and reply solving method.

       I will wait for your reply.

 

Thanks and Regards,

            Vicky.

0 Likes
Message 4 of 5

clutsa
Collaborator
Collaborator
Accepted solution

So I've got this (It's VBA but should be easy enough to make .Net) 

Sub ZoomToMate()
Dim app As Application
Dim doc As Document
Dim docM As Document

Set app = ThisApplication
Set doc = app.ActiveDocument
Dim mySelection As MateConstraint

'select the target mate
Set mySelection = app.CommandManager.Pick(kAllEntitiesFilter, "Select a mate from the model browser")

'switch to something that can be zoomed to
doc.SelectSet.Select (mySelection.EntityOne)

'run the zoom command
Dim zoomCmd As ControlDefinition
Set zoomCmd = app.CommandManager.ControlDefinitions("AppZoomSelectCmd")
zoomCmd.Execute

End Sub

It doesn't rotate the model automatically though. 

 

 

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes
Message 5 of 5

Anonymous
Not applicable

Dear Clutsa,

       Thanks for your Reply.

       Your reply was helpful to me.

       I need another one help from you.       

How to Zoom a place where the gap between the edges in the Constraint with using vba coding.

 

Capture.JPG

 

With Regards,

     Vicky.

 

 

0 Likes