TAGGED: scripting, spaceclaim
-
-
March 6, 2022 at 8:34 am
-
March 7, 2022 at 5:01 am
Devendra Badgujar
Ansys EmployeeHi GUICAD
Let me check and get back to you on this.
-
March 8, 2022 at 5:27 am
Devendra Badgujar
Ansys EmployeeHi GUICAD
Closest Edge to Secondary Selection...Text
active=Selection.GetActive()
if active.Count:
 item=active.Items[0]
 hitPoint = Window.ActiveWindow.ActiveContext.GetSelectionPoint(item)
 if isinstance(item,IDesignFace):
  closest=""
  dist=float('inf')
  for edge in item.Edges:
   project=edge.Shape.ProjectPoint(hitPoint)
   measuredDist=(project.Point.Vector-hitPoint.Vector).Magnitude
   if measuredDist(<)dist:
    dist=measuredDist
    closest=edge
Selection.Create(closest).SetActiveSecondary()
This should provide the key API needed, but you may need to change based on your needs. Let me know if this what you are looking for.
Regards.
-
March 8, 2022 at 5:52 am
Guillaume ANFOSSI
SubscriberPerfect, thanks !
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- loss of user settings
- Can’t see license on online account
- Copy user settings to new release
- help online
- Unexpected graphics error
- Electric Heating – Ansys AIM
- Dwg export error
- ANSYSLI Exited or could not read server port ANSYSLI_FNE_PORT
- Discovery AIM Mesh Error
- Natural frequencies limited to first 6 modes
-
3744
-
2573
-
1821
-
1236
-
596
© 2023 Copyright ANSYS, Inc. All rights reserved.