Distance between two faces in assy as a parameter

Distance between two faces in assy as a parameter

GoranBe
Advocate Advocate
2,490 Views
22 Replies
Message 1 of 23

Distance between two faces in assy as a parameter

GoranBe
Advocate
Advocate

Hello

 

What is the easiest way to get distance between two faces, store it into some user parameter and have the value updated if the distance changes. From experience I know that if I Measure the parameter value it will not update, if the distance changes. I tried to create dimension annotation in model, but I am not aware of how to use it's value as a parameter. In short, I'd like to have 47,00 mm dimension value from the picture below stored in the (named) parameter and updated, if it changes due to any reason - housing height change, constrains change etc...

 

Thanks for your ideas

Goran

aa.png

0 Likes
Accepted solutions (1)
2,491 Views
22 Replies
Replies (22)
Message 2 of 23

torbjorn_heglum2
Collaborator
Collaborator

I would create a sketch and place a driven dimension.

 

Torbjørn

Message 3 of 23

mdavis22569
Mentor
Mentor

As mentioned... by @torbjorn_heglum2 

 

Or you can set it up as a FX / Parameter prior in the sketch. Overall height = XXXXX

 

You adjust it / it adjust

 

Outside of it won't work ... 


Can you share the file for a quick review


Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------
Mike Davis

EESignature

Message 4 of 23

GoranBe
Advocate
Advocate

Torbjørn,

 

[OT] I must admit I'm somehow confused about how and when projections in the sketch are linked and maintained. I still don't get it when the reference geometry will be updated if the underlaying projected geometry changes and when not. Or how to make it linked. Or how to know if some specific projetced geometry in sketch is linked or not. When creating darwinbg parts some projections are linked (eg looped part geometry will result in projetced geometry item as part of drawing) and some are not (eg cut edges, single edges ...) I haven't find any good reference about it yet.

 

Therefore I did think of your idea but I'm too ignorant to actually rely on it.

 

Thanks

Goran

 

 

 

 

0 Likes
Message 5 of 23

mdavis22569
Mentor
Mentor

Have you never seen or played with this feature?

 

It's really quite easy once you see how it's done .... 

 

trying to get a quick video today to show it 


Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------
Mike Davis

EESignature

0 Likes
Message 6 of 23

GoranBe
Advocate
Advocate

Michael,

 

you mean project geometry? If so, I use it a lot, but I'm still confused when the link is created and mantained and when not.

 

Regards

Goran

0 Likes
Message 7 of 23

mdavis22569
Mentor
Mentor

Some like this what I'd be using for what you are describing

 

https://autode.sk/2UMBhml

 

 

Give it a minute or two to upload


Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------
Mike Davis

EESignature

0 Likes
Message 8 of 23

GoranBe
Advocate
Advocate

Michael,

 

thank you very muh for you input. I use tehcniques you have shown all the time when creating parts and assemblies. My original question was about how to get some dimesion, which is not explicitly known, into parameter. As in my example, where the overall height is sum of the height of the housing, height of the lid's bottom and the distance between the lid and the housing defined when placing a constraint.

 

Of course I can caluculate the overall height from data (parameters) given. But Inventor "knows" the value very vell already as you can annotate the overall height. I'm looking for the best way to get this value into parameter that will be later used for something else, eg(pseudo code)

      UpperPlane_Height = 30  mm

      Overall_Height = <annotaded_dimension_0>

      MountingHole_Depth = Overall_Height - UpperPlane_Height

so that "MountingHole_Depth" will be calculated autmatically when I play with other dimensions.

 

Regards

Goran

 

Regards

Goran

     

0 Likes
Message 9 of 23

mdavis22569
Mentor
Mentor

So you want to pull / export it out? 

 

If so, make it populate a custom iproperty. 


Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------
Mike Davis

EESignature

Message 10 of 23

GoranBe
Advocate
Advocate

No, I want to make this assignment somehow work:

 

Overall_Height = <annotaded_dimension_0>

 

as there is no way I know to get <annotaded_dimension_0>

 

Regards

Goran

0 Likes
Message 11 of 23

mdavis22569
Mentor
Mentor

Maybe @mcgyvr  can help .... 

 

M


Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------
Mike Davis

EESignature

0 Likes
Message 12 of 23

GoranBe
Advocate
Advocate

He'd know for sure (ROTFL)

0 Likes
Message 13 of 23

mcgyvr
Consultant
Consultant

Lets see if this technique works for your situation... 

I'm assuming that those are 2 different parts in an assembly.. (I'm going to call them knurled cap and housing because well I want to 😁 )

Simply link in the parameter of the knurled caps height from its part file and the parameter of the housing height from its part file into the assembly... Then you have the distance you want as the sum of those 2..

 

Steps as follows...

In the assembly go to the parameters dialog (fx button) and press the link button at the bottom..

Find the knurled cap and link the height of that into the assembly..

Repeat for the housing..

Now you have those parameters linked and usable in your assembly.. Should either of those change then the assembly will know and update accordingly... 

 

 

 



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
0 Likes
Message 14 of 23

GoranBe
Advocate
Advocate

Thank you for your entry. This is how I do it exactly right now. In knurl cap I create exported automatic parameter "Cap_Thickness" where I subtract thread depth from the total height of the cup to  get thickness of the cup above housing. In housing I export parameter "Housing_Height". In assembly I create constraint between facing pages, than name distance parameter "Gap" and enter distance of say 0,5 mm (used for rubber for example).

 

Than I calculate overall height parameter summing those up. But in general, Inventor knows this value using parameters or not. My question is still the same - what is the best way to get this distance between two faces directly in the assembly.

 

Thanks again

Goran

 

BTW, I like your nickname a lot.

0 Likes
Message 15 of 23

mcgyvr
Consultant
Consultant

@GoranBe wrote:

My question is still the same - what is the best way to get this distance between two faces directly in the assembly.

 


That IMO is the "best/easiest" way (based on the details provided so far) to get that type of distance in an assembly that is usable by something else in the assembly..

 

 

 



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
Message 16 of 23

torbjorn_heglum2
Collaborator
Collaborator

I don't use too much assembly sketches like this myself, but it does indeed work.  But that is just because I normally do the design in master parts and keep the assemblies as simple as possible.

 

Assembly sketches lack some functionality (and are somewhat less stable) compared to part sketches. For instance, if you project part sketch geometry to an assembly sketch it will be grounded and will not update. 

 

Model edges can be projected, and if you are in doubt you can always check the sketch constrain to see if it is associative or grounded. Normally those projected lines will stay stable until you do a something that changes the internal Inventor ID of the actual edge. If you replace the part, the projected line will fail. If you change the part so the edge disappear, the projected line will fail. If you delete the line in the part sketch and redraws it, the projected line will fail. The last example can be harder to understand than the first ones, because the geometry might looks identical to the human eye. But inside Inventor it has got a new ID, and the projected line does not find its reference.

 

The driven dimension will be a reference parameter and can be used for example to control an assembly constraint or as a value in some iproperty.

 

Torbjørn

Message 17 of 23

GoranBe
Advocate
Advocate

Torbjørn,

 

this is one of te best explantions of associative projections, thanks. For resons you just point out I don't rely on associative projections because association may be lost without warning even you think you didn't change anything essential.

 

Please excuse my ignorance - but how to check this: "if you are in doubt you can always check the sketch constrain to see if it is associative or grounded. "

 

Regards

Goran

0 Likes
Message 18 of 23

torbjorn_heglum2
Collaborator
Collaborator

If an associative projection fails you will normally be warned since the sketch will report a fail. But if the projection was grounded, no warning when things change.

 

When you are in the sketch press F8  and you will see all sketch constraints. 

 

Constr.jpg

Torbjørn

Message 19 of 23

kelly.young
Autodesk Support
Autodesk Support

Hello @GoranBe you can try to use this iLogic code to populate a measured distance to a parameter, but that is manually selected:

Using the Measure.MinimumDistance command

 

I was thinking you could define Faces or WorkPoints and then bring access NamedEntities to pull the distance between the two into the assembly as a User Parameter. Here are a few links that may help:

NamedEntities Interface

iLogic - Get NamedEntity of Part from Assembly level

Assigned Names for faces Change Color using Ilogic or API

 

Please select the Accept Solution button if a post solves your issue or answers your question.

Message 20 of 23

GoranBe
Advocate
Advocate

Kelly,

 

thanks a lot, that's where I can start from. I just wonder - can I get 3D dimension annotation into iLogic somehow? Eg, get value of OHa in example below?

 

Regards

Goran

 

aa.png

0 Likes