Finding a referenced dimension in a complex drawing

Finding a referenced dimension in a complex drawing

dkampWQTNE
Contributor Contributor
5,279 Views
19 Replies
Message 1 of 20

Finding a referenced dimension in a complex drawing

dkampWQTNE
Contributor
Contributor

I have a drawing where I have directly referenced another dimension from another sketch in the drawing, let's say it is d322. Is there an easy way to find the original dimension in the drawing. I am sure it is not best practices to do this but it is done and I need to find it. BTW just learning Fusion. Thanks.

5,280 Views
19 Replies
Replies (19)
Message 2 of 20

TrippyLighting
Consultant
Consultant

You have to do this manually and go into the user parameter panel which lists ALL parameters, not just the ones you created.

Unfortunately once in that panel, again, you have to search for it manually.


EESignature

Message 3 of 20

dkampWQTNE
Contributor
Contributor

Thanks but that does not really help as I would need to find it in the sketch it is in. New feature???

Message 4 of 20

TrippyLighting
Consultant
Consultant

The user parameter dialogue lists sketches and other "stuff" per component in the Model Parameters section.
It helps to give sensible names to sketches and other objects.

 

A search feature would indeed very nice, but I would not call that a feature. I've asked for that a thousand times to no avail. I be that "idea: exists more than once in the Idea Station.

Data management in Fusion 360 is somewhat rudimentary.


EESignature

Message 5 of 20

BlondieSL
Contributor
Contributor

I agree that a search function would be nice.

I'm very new to Fusion and right now, I have a design with lots of parameters.  I use parameters for everything.

But I may have some parameters that I created, in the Parameters Window, that may now not be used in the design.

Of course, I COULD save the design then delete what I THINK is not used and just see if things break.

But when in Edit Sketch, it would sure be nice to be able to start a FIND and search for a parameter name and if found in the sketch, have that element light up or something.

 

Message 6 of 20

mark.alan.good
Participant
Participant

I have a similar issue.  I have a relatively simple model with a user parameter that I would like to delete.  But apparently it is referenced by a dimension that I can't find (d65)!  I have expanded all user & model parameters, but there doesn't seem to be a d65 dimension.  Where the heck is it!?  A search feature would be great.

0 Likes
Message 7 of 20

g-andresen
Consultant
Consultant

Hi,

Please share the file.

File > export > save as f3d locally  > attach it to the next post.

 

günther

0 Likes
Message 8 of 20

thomasDTVML
Participant
Participant

Yeah I have this problem. In all honesty it is today’s task to look into it. Somehow after either:

copying a 3D model or inserting a model into the design in question 

 it has bought over/ created a duplicate user parameter. it would be handy if there were a search tool in parameter so that I could find out in what part the parameter is being used so that I am able to find out what is going on. 

Message 9 of 20

florianhu
Explorer
Explorer

CTRL-F in the parameters window would be great!

 

For anyone who is bothered enough to add a script for this here is mine:
(pops open a dialog asking for a regular expression and looks for it in components, bodies, sketches, dimensions, then prints the result in the shell)

 

import adsk.core, adsk.fusion, traceback
import re

# check bodies
def traverseBodies(breps, parentName, currentLevel, regex):
    result = ''
    for body in breps:

        if re.match(regex, body.name):
            result += ' ' + parentName + ' : ' + body.name + "(body)\n" + result;

    return result

# check sketches
def traverseSketches(sketches, parentName, currentLevel, regex):
    result = ''
    for sketch in sketches:

        if re.match(regex, sketch.name):
            result = ' ' + parentName + ' : ' + sketch.name + "(sketch)\n" + result;

        for i in range(sketch.sketchDimensions.count):
            dim = sketch.sketchDimensions[i]
            if dim and re.match(regex, dim.parameter.name):
                result += '  ' + parentName + ' : ' + sketch.name + ' : ' + str(dim.parameter.name) + "\n"


    return result

# Performs a recursive traversal of all components
def traverseAssembly(occurrences, parentName, currentLevel, inputString, regex):
    for occ in occurrences:

        # check bodies in component
        bodyResult = traverseBodies(occ.component.bRepBodies, parentName + " : " + occ.name, currentLevel, regex)
        #check sketches in component
        sketchResult = traverseSketches(occ.component.sketches, parentName + " : " + occ.name, currentLevel, regex)

        # check component name itself
        if re.match(regex, occ.name) or sketchResult or bodyResult:
            inputString += parentName + ' : ' + occ.name +'\n'+ bodyResult + sketchResult

        # check children
        if occ.childOccurrences:
            inputString = traverseAssembly(occ.childOccurrences, parentName + " : " + occ.name, currentLevel + 1, inputString, regex)
    return inputString




def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface
        
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)
        if not design:
            ui.messageBox('No active Fusion design', 'No Design')
            return


        # regex search, eg.  '(?i)' case insensitive, 'd100' dimension d100, '.*gears.*' anything with gears in the name, etc
        searchTerm = ui.inputBox('search for', 'regex', '(?i)d[0-9]+')

        # Get the root component of the active design.
        rootComp = design.rootComponent
        
        regex = re.compile(searchTerm[0])
        
        #check root bodies
        resultString = traverseSketches(rootComp.sketches, rootComp.name, 1, regex)

        #check root sketches
        resultString += traverseSketches(rootComp.sketches, rootComp.name, 1, regex)

        # Call the recursive function to traverse the assembly and build the output string.
        resultString = traverseAssembly(rootComp.occurrences.asList, rootComp.name, 1, resultString, regex)

        if not resultString:
            resultString = 'nothing found'

        # Write the results to the TEXT COMMANDS window.
        textPalette = ui.palettes.itemById('TextCommands')
        if not textPalette.isVisible:
            textPalette.isVisible = True
        textPalette.writeText(resultString)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

 

Message 10 of 20

MartyMcFly84
Participant
Participant

Wow! 2024 and no solution to this yet?

My model dimension depends on d124, but i can not find it anywhere in the sketch. Changing it manually in the parameter dialog breaks the design.

Ive tried the script by @florianhu but d124 returns "nothing found". In fact any dimension I try returns nothing found... I have no clue on how to find this dimension 😞

0 Likes
Message 11 of 20

TrippyLighting
Consultant
Consultant

Every dimension is stored as a parameter and can be found using the filter/search function in the User Parameter panel.

That will allow you to locate the sketch or feature the dimension is used in.

 

TrippyLighting_0-1715253630308.png

 


EESignature

Message 12 of 20

tim_s_curtis
Community Visitor
Community Visitor

It is helpful showing the feature and sketch the dimension is used in. But it can still be extremely difficult to find a specific dimension even when you know the feature and sketch. In complex drawings it is just too difficult and inefficient to manually find a specific dimension. Is there any way to search for a dimension within a specific drawing?

0 Likes
Message 13 of 20

davebYYPCU
Consultant
Consultant

Paramaters has Search added, a little while now.

 

Search for D8 

is used only once in the file, value 5.75, so going to sketch 1 in the file, removes the guesswork.

 

ssfadb.PNG

 

Might help....

Message 14 of 20

tim_s_curtis
Community Visitor
Community Visitor

Thanks Dave. But is there any way to go from finding it in Parameters (which also shows the sketches it occurs in), to seeing where it actually occurs on the sketch? because for complex drawings it can be really difficult to find where the dimension actually is. So you can see that, in your example above, that d8 appears in Sketch1, but where on Sketch1 is d8?

Clicking on the results of a search in Parameters doesn't seem to highlight the parameter on the sketch.

0 Likes
Message 15 of 20

davebYYPCU
Consultant
Consultant

That would depend on the sketch - but each parameter is unique - how it would be hard to find is not obvious.

With that sketch open and the parameter edited for a new value, should animate in the window.

 

Might help....

0 Likes
Message 16 of 20

MartyMcFly84
Participant
Participant

In my case it was difficult to find because it was not there anymore!

It was a dimension referenced to another dimension and when deleted the last one from the sketch it was still present in the parameters. So there was no way to find it.

Looks obvious, but when you have many parameters depending one from another it was confusing to find and realized that it was not present in the sketch anymore.

0 Likes
Message 17 of 20

HughesTooling
Consultant
Consultant

@MartyMcFly84 When you delete a dimension that's referenced by another dimension it is converted to a Model Parameter and appears below the User Parameters and the filter should make it quite easy to find where it's still in use.

HughesTooling_0-1732098303152.png

 

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Message 18 of 20

Dylan_Rawlinson
Participant
Participant

Good discussion about parameters in which naming the dimensions and features would improve the process. Renaming is still a long winded process in which you have to remember the original name of the dimension or feature before you open the parameter list. You then need to remember where exactly this is within the timeline/browser tree. 

 

I would like to add my interest in making the parameters easier to identify within the list as this would greatly improve the functionality. 

A simple improvement would be to allow users to rename a dimension within the sketch itself for easier navigation. SolidWorks offers a similar functionality at the point of creating dimensions. Could Fusion implement something similar? or a right mouse click and rename function? 

 

Other users have brought this up in the past - Are there any plans to improve the parameter functionality? 

0 Likes
Message 19 of 20

g-andresen
Consultant
Consultant

Hi,

are you talking about something like this?

 

 

günther

Message 20 of 20

Dylan_Rawlinson
Participant
Participant

Exactly like that! I apologise, I didn't realise this was possible in Fusion, I think I tried something similar but had spaces between characters! 

 

Thank you! This is going to be a huge time saver for my complex models 

 

0 Likes