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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Custom ribbon named seperators?

IceMelon
5-Regular Member

Custom ribbon named seperators?

Hello

 

I am working on a custom quick acces toolbar in Creo Elements version 20.1.2.0

I am making 1 tab that contains all the functions i need on a regular basis. And one that relocates my most used functions to the foreground. I wanted to create named seperators like the standard menu does. But I can only find the boring old line seperator.

 

Is there any way to give my custom split menu a nice looking format like standard? Or is that something that is reserved for the base program?

 

▼What i've got so far▼

SolidDesigner_6H9kkeqa1U.png

 

▼What I want▼

1R3JUGZqDq.png

 

If anyone knows how to do this. I would love to know it. Its not completely neccesary, but it would be a nice clean look to a layout that may be used as a standard within the company.

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

Welcome! 

 

I believe you should be able to get what you want by including only a ":label" component in your :contents list. For example (simplified):

 

:contents

'((:label "item1" :availCmd ("SolidDesigner" "MyApp" "MyFunc1")

  (:label "Separator 1")

  (:label "item2" :availCmd ("SolidDesigner" "MyApp" "MyFunc2")

)

 

Does that work for you? Please let me know if you have any questions.

 

Thanks!

 

 

View solution in original post

12 REPLIES 12

Welcome! 

 

I believe you should be able to get what you want by including only a ":label" component in your :contents list. For example (simplified):

 

:contents

'((:label "item1" :availCmd ("SolidDesigner" "MyApp" "MyFunc1")

  (:label "Separator 1")

  (:label "item2" :availCmd ("SolidDesigner" "MyApp" "MyFunc2")

)

 

Does that work for you? Please let me know if you have any questions.

 

Thanks!

 

 

IceMelon
5-Regular Member
(To:AndyPoulsen)

Hello Andy!

 

I'm based in the Netherlands. So it's almost bedtime for me. But I was wondering about your syntax. Because I customized my ribbon through the Creo Direct customization interface. And I have not yet tried to find the file in which this customization is stored. 

 

But is this just a txt or config file I can add your suggested lines to? If so, I can try that tommorow. I'll let you know if it worked.

 

Thanks for the reply 👍

Not sure about that -- I was thinking you were creating your own menu option using code...  I'll investigate a bit and get back to you...  

The all-ribbon.lsp can be modified and added to your sdcorp directory.

 

I have attached an example of what I have done.

 

Tom

 

Creo Element\Direct Modeling 20.6.0.0.0
IceMelon
5-Regular Member
(To:ThomasKirkman)

Thanks for the additional info. I'm gonna peek inside that file for some insight. I'll update the thread if/when I implement the solution. That will be tomorrow at the soonest.

 

Thanks for the reply and the file. 

This took me about a month of trial to get it right.  Take your time to learn how the ribbon works.  It would take me far longer to explain how it works, than it would take for you to experiment.  Just make lots of backups and experiment.

 

Share and Enjoy?  (sorry had to quote "Hitchhikers guide to the galaxy")

 

Creo Element\Direct Modeling 20.6.0.0.0
IceMelon
5-Regular Member
(To:ThomasKirkman)

Hello Thomas

 

I placed your all-ribbon.LSP file in my customisation folder.

Since my customised file was named sd_ribbon, it added your tabs in adition to my already existing custom tab called *

However all the commands were greyed out. ▼

SolidDesigner_LuOWFrevzq.png

 

Here is a screenshot of my LSP file next to yours

Left▼ Your custom ribbon saved in all_ribbon.LSP                                  Right▼My custom ribbon saved in sd_ribbon.LSP

notepad_Xcot2uutqu.png

 

The main difference I can spot is that you call out "O-I Reference"

I suppose this is either a module we dont have, a feature from a future update, or something you custom made.

Whatever it means, your ribbon doesn't quite work for me.

Only the 3d spiral seems to work since its defined as follows:

 

(oli::sd-fluentui-add-ribbon-button
          :parent '("O-I Toolbox" "Create")
          :annotationRibbon nil
          :userDefined t
          :label "Spiral 3D/Helix"
          :availCmd '("SolidDesigner" "3D Curve" "Spiral 3D/Helix")

 

It references a subgroup called "3D Curve" instead of "O-I Commands". And that seems to be the reason why its one of the few buttons that works for me.

 

I also saw many other functions that I haven't seen in Creo before. 

I suppose these functions are from PTC modules? Or are some of these custom macros.

Thats the final piece of my puzzle. Since I haven't found a way to place custom macros in the ribbon tab through the customisation interface.

 

Its slightly off topic to this thread. but...

Do you know how i can place our "Rename all shares" command in my custom ribbon?

 

Thanks for the input.

In addition to Tom's excellent suggestions, if you've been experimenting a bit, you should have an all_ribbon.lsp file in your user customization directory (usually something like "C:\Users\<username>\AppData\Roaming\PTC\Creo Elements Direct Modeling 20.1\20.1\all_ribbon.lsp). to use as a starting point (and as Tom says, make a backup before you start playing with it). This file will be loaded every time you start Modeling.

 

Note that you will need to restart Modeling each time you edit the file to pick up the changes.

 

You can use the (:label "My Separator") idea in any of the :contents sections as you experiment. For example, when you first open that file, the area where you currently have your separator (which will be in the middle of a (:contents ....) section) you should see the line (:separator t) -- you can replace that with (:label "My Label"), to get the behavior you want..

 

Good luck -- this stuff can be fun!

 

andy

IceMelon
5-Regular Member
(To:AndyPoulsen)

Good morning Andy,

 

Your solution worked flawlessly. I will be adding labels after i complete my layout with the built-in customisation menu.

If there are any other tips and trick i can use, I'll be glad to hear them.

SolidDesigner_6Wl8kKTpOX.png

 

One thing that was slightly different than what you explained was that i had a different .LSP file for my ribbon.

The file is called sd-ribbon.LSP. (presumably after "SolidDesigner") After I added the named label to this file as you suggested, I got the results i needed.

The all-ribbon.LSP contains just a group i made months ago that i added to the standard "Modeling" tab.

 

Maybe it has something to do with calling the group " * "

Is there any downside to having this be a different LSP file?

 

explorer_ULfQjFqgeE.png

 

My menu references a lot of customized lsp files, so that is why they are greyed out,  I sent the file so you can see the format for spacing and creating new tabs.  I am willing to share lisp files, if you see something that peaks your interest, let me know.

 

This site has a lot of macros that might be of interest. http://osd.cad.de/lisp_3d.htm

 

Tom

 

Creo Element\Direct Modeling 20.6.0.0.0
IceMelon
5-Regular Member
(To:ThomasKirkman)

Hello Tom,

 

The website you sent has some amazing content! I will definitely be using some of the macros in there.

Such as "Putting Parts/Assemblies to Zero" and "Center of gravity lines" to name just 2 that could drastically increase my workflow.

 

I was feeling kind of cynical when you said you spent around month on your ribbon. Since I spent about an hour to setup 40% of my ribbon wtihin the Creo interface. But seeing how far you can customise it, i can see how you spent that kind of time on this.

 

I know you said you didn't want to have to explain the whole process of customising the ribbon. But is there any kind of resource i can reference?

I am particularly curious to where you store your macros and reference to them with the ribbon. I can probably figure it out through trial and error. But if someone has already done it before me, id rather not waste too much time on it myself.

 

Especially since our company will be moving away from Creo Direct in the not-so-distant future.

 

Thanks again for your insights! And if you have any info on where you store your macros, or other useful resources, that would be greatly appreciated.

 

Kind regards.

There are several resources.

 

First if you type in Ribbon Menu in the Creo elements/Direct Help you get a lot of information.

 

second, the website I sent above has a lot of help if you go to the main menu. 

 

Third, the CoCreate Users group (CoCreate being the original name) has a lot of resources as well.  

https://www.cocreateusers.org/forum/index.php

 

 

Tom

Creo Element\Direct Modeling 20.6.0.0.0
Top Tags