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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Declare variable

gcontreras
1-Visitor

Declare variable

I´m struggling with declaring variables for quiet some tiem. Someone showed me some months ago how to declare a variable and give a value to it and what I can remeber it has to do with notebook and layout. Unfortunately I can´t remember anything else and can´t figure it out.


What I intend to do is create a name which a value will be given. And this name I can use it in my part in the relations for example "mass=variable*5" And the "variable" should have been created somewhere and somehow with a given value.


I know that when I go to my part I need to go to "declare variable" and then in Notebook select the layout... But how can I create this layout?



Thanks a lott!!



Best regards,

Edna


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
ACCEPTED SOLUTION

Accepted Solutions

Edna,

  • Create a notebook via FILE > NEW > NOTEBOOK > enter a filename and select OK; Use an empty template; choose whatever size you'd like.
  • Use TOOLS > PARAMETERS and create your parameter as you would in a normal part file. No need to designate the parameter.
  • Use LAYOUT > DECLARE > select the name of the notebook you specified above.
  • Save the notebook.
  • Close the window, but leave the notebook in session for easy access.
  • Create or open your .prt/.asm model
  • Use FILE > MANAGE FILE > DECLARE > DECLARE NBK and select the notebook you just created
  • You now have access to the parameter in your .prt/.asm. If you open the .prt/.asm parameter UI, you'll see the notebook parameter listed.

I assume you want to use the same parameter in multiple models controlling it via the notebook.

As a convenience, it's nice to create a table in the notebook that lists all the parameter names and their values. It makes it easy to "edit value" vs. entering the parameter UI to change the values.

Good luck with the notebook.

Regards,

Daniel Nordin

BAE Systems

www.baesystems.com

View solution in original post

2 REPLIES 2

Edna,

  • Create a notebook via FILE > NEW > NOTEBOOK > enter a filename and select OK; Use an empty template; choose whatever size you'd like.
  • Use TOOLS > PARAMETERS and create your parameter as you would in a normal part file. No need to designate the parameter.
  • Use LAYOUT > DECLARE > select the name of the notebook you specified above.
  • Save the notebook.
  • Close the window, but leave the notebook in session for easy access.
  • Create or open your .prt/.asm model
  • Use FILE > MANAGE FILE > DECLARE > DECLARE NBK and select the notebook you just created
  • You now have access to the parameter in your .prt/.asm. If you open the .prt/.asm parameter UI, you'll see the notebook parameter listed.

I assume you want to use the same parameter in multiple models controlling it via the notebook.

As a convenience, it's nice to create a table in the notebook that lists all the parameter names and their values. It makes it easy to "edit value" vs. entering the parameter UI to change the values.

Good luck with the notebook.

Regards,

Daniel Nordin

BAE Systems

www.baesystems.com

Thank you so much

Best regards!

Edna

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags