cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Does anyone have a custom macro to remove object tip information from objects?

Does anyone have a custom macro to remove object tip information from objects?

Hi there,

we have a bunch of 2d and 3d graphics that have "object tips" in the Objects.  We only need to remove the object tip (the hovering text) part.

Is there an existing custom macro for that or is there a batch process technique?   I would like to streamline the process for efficiency.

Any ideas?

kr

Janine

9 REPLIES 9

Re: Does anyone have a custom macro to remove object tip information from objects?

Made an assumption. Please correct if wrong. You can't actually delete 'object tips' as it is a built-in field (well, technically you could by some in-depth customizations but I digress). So I'm assuming you just want the value set to null for this field. The following macro should do this. Not it does this at the top level. What I mean is that if you have a group with an object tip it will clear that. But if you have additional object tips within that grouping it does not go that far. Possible, but it gets much more complicated.

Macro Remove_Object_Tips

    #Declare variables

    Define el as Element

   

    #Clear existing selection.

    Select None

   

    #Select all objects with object tips populated.

    Select if Object_tip is not equal to ""

   

    #Loops through objects removing object tips.

    el = ActiveDoc.firstSelectedElement

   

    While(exists(el) = True)

        el.info.tip = ""

        el = el.NextSibling

    End While

   

    #Clears selection.

        Select None

End Macro

Re: Does anyone have a custom macro to remove object tip information from objects?

Thanks Trevor, but it didnt work for 3D embedded Object information tips that are embedded...any other ideas?

Thanks so much, Janine Hasselbring

Re: Does anyone have a custom macro to remove object tip information from objects?

It did work great for the 2D object tip removal though

Re: Does anyone have a custom macro to remove object tip information from objects?

I pulled in a prt file, added an Object tip and then ran the macro and it cleared out so I'm not sure why it's not working for you. Are the elements within a group or...?

Do you have a simple 3D file you could provide as a test case?

Re: Does anyone have a custom macro to remove object tip information from objects?

This seems to work well:

Macro v2_Remove_Object_Tips

    #Declare variables

    Define el as Element

   

    #Clear existing selection.

    Select None

   

    #Select all objects with object tips populated.

    Select if Object_tip is not equal to ""

   

    #Loops through objects removing object tips.

    el = ActiveDoc.firstSelectedElement

   

    While(exists(el) = True)

        el.info.tip = ""

        el = el.nextSelectedElement

    End While

   

    #Clears selection.

        Select None

End Macro

Re: Does anyone have a custom macro to remove object tip information from objects?

I'm going crazy. What's the difference between that one and the one I posted?

Re: Does anyone have a custom macro to remove object tip information from objects?

we replaced "nextsibling" with "nextSelectedElement"  under the "While..."

Highlighted

Re: Does anyone have a custom macro to remove object tip information from objects?

we had objects that are nested within other objects...

Re: Does anyone have a custom macro to remove object tip information from objects?

Ah. Missed that difference and nice catch. Glad you got it working.