×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Part Appearance Control

Part Appearance Control

Part Appearance Control

(OP)

Has anyone ever heard of controlling the color/transparency of a part/solid with an expression?
For example: Parameterizing a part's color and/or transparency to respond to a measure during a simulation.
Is this possible? Can appearance attributes be accessed and manipulated during a simulation?

Thanks,

RE: Part Appearance Control

Beats me. Where does a part's color get referenced in the Solver? I suspect it doesnt.

Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

RE: Part Appearance Control

(OP)
What if I were to make an identically shaped solid/part with a different color that is activated by a sensor?
How might I begin if my goal were to activate/deactivate parts based on sensor/measurement output?
Thanks,

RE: Part Appearance Control

Can you explicitly deactivate parts inside a solver run, or do you have to STOP the simulation, and then DEACTIVATE parts in the acf, and then RELOAD the simulation?

However so far as I can see DEACTIVATE does not work on colors or parts.

This would be a very good question for the msc adams forum.

Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

RE: Part Appearance Control

A bit more research suggest that the solver is colorblind. View writes out a separate text file, .cmd I think, with colors in, but the solver never sees them.

Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

RE: Part Appearance Control

Greg is right, as usual. The solver does not know much or can affect the color, transparency or other graphical phenomenas.
And it really doesn't matter anyway, what would you use it for?

What I think you are after is a way to affect the animation based on simulation results. And that is doable using the MDI_ANIMATION_CALLBACk macro.
Must have this name and call, and will be called by PPT before each frame.
Here is a simple example:

!USER_ENTERED_COMMAND mdi_animation_callback
!
!
if cond=(eval(mdi_animation_counter) == 45)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 0
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 100
!
elseif cond=(eval(mdi_animation_counter) == 46)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 10
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 90
!
elseif cond=(eval(mdi_animation_counter) == 47)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 20
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 80
!
elseif cond=(eval(mdi_animation_counter) == 48)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 30
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 70
!
elseif cond=(eval(mdi_animation_counter) == 49)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 40
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 60
!
elseif cond=(eval(mdi_animation_counter) == 50)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 50
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 50
!
elseif cond=(eval(mdi_animation_counter) == 51)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 60
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 40
!
elseif cond=(eval(mdi_animation_counter) == 52)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 70
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 30
!
elseif cond=(eval(mdi_animation_counter) == 53)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 80
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 20
!
elseif cond=(eval(mdi_animation_counter) == 54)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 90
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 10
!
elseif cond=(eval(mdi_animation_counter) == 55)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 100
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 0
!
elseif cond=(eval(mdi_animation_counter) == 65)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 100
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 0
!
elseif cond=(eval(mdi_animation_counter) == 66)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 90
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 10
!
elseif cond=(eval(mdi_animation_counter) == 67)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 80
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 20
!
elseif cond=(eval(mdi_animation_counter) == 68)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 70
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 30
!
elseif cond=(eval(mdi_animation_counter) == 69)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 60
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 40
!
elseif cond=(eval(mdi_animation_counter) == 70)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 50
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 50
!
elseif cond=(eval(mdi_animation_counter) == 71)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 40
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 60
!
elseif cond=(eval(mdi_animation_counter) == 72)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 30
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 70
!
elseif cond=(eval(mdi_animation_counter) == 73)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 20
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 80
!
elseif cond=(eval(mdi_animation_counter) == 74)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 10
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 90
!
elseif cond=(eval(mdi_animation_counter) == 75)
entity attributes entity_name = .model_1.PART_2.CYLINDER_1 transparency = 0
entity attributes entity_name     = .model_1.PART_2.BOX_2 transparency    = 100
!
end
!
!-----------------------------------------
! Increment counter
!-----------------------------------------
!
variable modify variable=mdi_animation_counter integer = (eval(mdi_animation_counter) + 1)

if cond=(eval(mdi_animation_counter) > 100)
variable set variable=mdi_animation_counter integer = 1
end !if
!

Jesper Slattengren
www.prattmiller.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

White Paper - Considerations for choosing a 3D printing technology
The adoption of 3D printing into major companies’ product development life cycles is a testament to the technology’s incredible benefits to consumers, designers, engineers and manufacturers. While traditional production methods have limitations in manufacturability, 3D printing provides unparalleled design freedom due to the additive method of building parts layer by layer. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close