Wednesday 5 November 2014

Browser name code update

Hi guys,

Short post today.

I have been really busy lately, trying to get together a list of best practices for tube and pipe along with Chris Benner (the guru instructor). Check his blog here.
There has been also tests on the latest version of mExtension which I hope to present shortly. It's been working on all versions but further tests need doing. like 32 and 64 bit, winxp or 7 as many inventor versions possible.
I have had long days helping out Inventor forum and especially a lengthy post on frame generator which I also hope to bring to you soon.

Meanwhile I have updated a bit the code that changes the browser name (occurrence name) which I use to tag my valves and instrumentation.

In this version, while you select parts in the graphical window you will get a prompted entry with the existing occurrence name and the new one you want in.

Here it is:

'-----------start code
Dim comp As Object

    While True
        comp = ThisApplication.CommandManager.Pick(
            "Select a component")
        oTagOcc = InputBox("Enter Tag No: ", "Tag Prompt", comp.Name)
            comp.Name = oTagOcc

    End While
Catch ' do nothing if error

End Try
' ------------ end code

Have a great day

No comments:

Post a Comment