ansys.net search results
quick file search:
    home » search results
 
 
Macros (19 entries)
 
12 Predefined Views
  Matthew Pausley (Nuvotronics, Inc.)
  This is an XML file that can be used in Workbench Mechanical to provide 12 common views aligned with the coordinate axes. The naming convention is “Up-Axis + Axis of viewing”, i.e. “Z+X” means “Z axis is up, looking in the direction of positive X”.

To import this XML file into Workbench Mechanical, go to "View menu > Windows > Manage Views", then click on the "Import..." icon in the Manage Views panel to import this XML file.
[permalink]
 
Average Rating: 5.0 (1 vote)  
Rate this item:
 
attrib_2_Load
  (ANSYS, Inc.)
  "This script will apply a force load (magnitude 1000) on each entity that is flagged with an attribute beginning with DSA in the first assembly. There are two mechanisms by which this is done; one via the part manager the other via the DS tree."
[permalink]
 
Average Rating: 8.6 (25 votes)  
Rate this item:
 
attrib_2_Load_FEA
  (ANSYS, Inc.)
  "This script will apply load and boundary conditions based on attributes that exist on the model. They are filtered by an attribute prefix and divided by parts by a seperator."
[permalink]
 
Average Rating: 10.0 (5 votes)  
Rate this item:
 
attrib_2_MeshSizing
  (ANSYS, Inc.)
  "attributePrefix is intended to be the prefix of the attribute used in the CAD to represent mesh-sizing."
[permalink]
 
Average Rating: 10.0 (6 votes)  
Rate this item:
 
ContactName_NrTypeAdd
  Przemyslaw Siedlaczek (MESco)
  Workbench macro sets contact name by adding number and type ID.
[permalink]
 
Average Rating: 10.0 (2 votes)  
Rate this item:
 
ContFrictVsTemp
  Przemyslaw Siedlaczek (MESco)
  Workbench macro adds APDL code to the contact branches to define temperature-dependent coefficient of friction.
[permalink]
 
Average Rating: 10.0 (2 votes)  
Rate this item:
 
EngineeringChecker
  (ANSYS, Inc.)
  "This file determines if the displacement for a total deformation result is greater than 1/10 of the diagonal of the geometry's bounding box. If it is greater, a comment is added to the "solution" node of the tree. The comment will tell how much greater than the diagonal of the bounding box the displacement is."
One of the sample DesignSpace 6 macros provided, which can be found in the installation directory. Use "Tools > Run Macro" to run this macro.
[permalink]
 
Average Rating: 10.0 (8 votes)  
Rate this item:
 
ExportBranchAsShortcut
  (ANSYS, Inc.)
  "When run from DesignSpace, this script writes out a JScript shortcut file that can recreate the active branch contents on demand."
One of the sample DesignSpace 6 macros provided, which can be found in the installation directory. Use "Tools > Run Macro" to run this macro.
[permalink]
 
Average Rating: 8.8 (4 votes)  
Rate this item:
 
FindContactsAttachedToParts
  (ANSYS, Inc.)
  "This file determines which contacts are associated with each part in a selected model. A comment is added to the "model" node of each active branch in the tree which lists the parts and the contacts associated with it. This macro will only work if the model has more than one part in it."
One of the sample DesignSpace 6 macros provided, which can be found in the installation directory. Use "Tools > Run Macro" to run this macro.
[permalink]
 
Average Rating: 8.6 (7 votes)  
Rate this item:
 
FindFreeStandingPartsInTree
  (ANSYS, Inc.)
  "This file determines which parts in a selected model have no contacts associated with it. If the part has no contacts associated with it, that part will be selected in the tree. This macro will only work if the model has more than one part in it.
This macro should be used at the model level or below. It is not intended for use at the project level or for multiple levels."

One of the sample DesignSpace 6 macros provided, which can be found in the installation directory. Use "Tools > Run Macro" to run this macro.
[permalink]
 
Average Rating: 10.0 (5 votes)  
Rate this item:
 
FindPartsWithNoContacts
  (ANSYS, Inc.)
  "This file determines which parts in a selected model have no contacts associated with it. If the part has no contacts associated with it, a check is also done to see if any supports are associated with that part. A comment is added to the "model" node of each selected branch in the tree. The comment will contain the names of the parts with no contacts and it will also show an error if those parts have no supports. This macro will only work if the model has more than one part in it."
One of the sample DesignSpace 6 macros provided, which can be found in the installation directory. Use "Tools > Run Macro" to run this macro.
[permalink]
 
Average Rating: 10.0 (2 votes)  
Rate this item:
 
Inventor
  Robert SeCaur (ANSYS, Inc.)
  In Workbench Design Simulation 8.0, Named Selections can be imported from certain CAD systems. For Inventor, this .vbs file will aid in exporting a group as a Named Selection.

"Here is the macro code for Inventor. It will create an attribute set on each selected entity (the name for this is immaterial) and an attribute in that set (the name for this is what will be looked at for creating a WB side attribute). More than anything this was a proof of concept script and does not have some of the "niceties" one might like (e.g. just adding to an already existing attribute set instead of creating a new one, or modifying an existing value if an attribute already exists of a given name in the given set). However, this script would allow you (with multiple invocations) to create multiple attributes on a given entity. That is something that an entity naming scheme does not allow conveniently. This is particularly significant for named selections, since an entity may need to be included in several named selections (perhaps one for load, one for mesh sizing, etc.)."
[permalink]
 
Average Rating: 9.5 (11 votes)  
Rate this item:
 
NameContactsByParts
  (ANSYS, Inc.)
  Macro to change all contact regions in Workbench to names of its contact parts.
[permalink]
 
Average Rating: 10.0 (13 votes)  
Rate this item:
 
NS_From_Unique_Names
  (ANSYS, Inc.)
  In Design Simulation 8.0, Named Selections can be imported from Pro/E. However, only one surface is given a name...

"Attribute transfer from Pro/E is particularly limited since each entity within a part needs to have a unique name. That means that our processing for named selections becomes particularly ineffective since we group entities of like name (exact match only) for named selections. These same attributes can be imported as general attributes and then "grouped" by a different paradigm with the use of the script attached.

Here the expectation is that user would create a common naming structure (beginning with NS, though this could be modified with a simple script change) for the entities that would belong to a named selection and make them unique based on a "_N" suffix. N here is meant to be some counting number though it could be any unique string."

[permalink]
 
Average Rating: 8.3 (3 votes)  
Rate this item:
 
PLOT_MAT_AS_TEMP
  Przemyslaw Siedlaczek (MESco)
  Macro to plot material properties as temperatures. (Note that this macro will apply boundary conditions to your model, so save your model first prior to using this macro.)
[permalink]
 
Average Rating: 8.3 (3 votes)  
Rate this item:
 
SelectBodysByMaterial
  Przemyslaw Siedlaczek (MESco)
  Workbench macro selects all bodies with the same material as the selected body.
[permalink]
 
Average Rating: 10.0 (3 votes)  
Rate this item:
 
setLegend
  Al Hancq (ANSYS, Inc.)
  "The macro below will set the legend of the current result in DesignSpace. (Note that this and any legend setting will get wiped out after a resolve)"
  1. put the contents below into a script file (like setLegend.js), setting the legend min/max as desired
  2. select your desired result.
  3. run this macro via Tools->Run Macro

"You can make this macro to be more elaborate such as walking down the tree and setting all result legends at once."

"I have verified this macro in DesignSpace 6.0.1 but it should work in DesignSpace 6.0 as well."


[permalink]
 
Average Rating: 10.0 (5 votes)  
Rate this item:
 
setScale
  Sheldon Imaoka (ANSYS, Inc.)
  "Attached is a quick hack of a macro to change the scaling for the deformed shape in DesignSpace v6. Edit the file and put in the scale factor you want, then use "Tools > Run Macro..." to run this.
Please note that your Results toolbar will not be updated with this macro, and it will show whatever you had previously (like "0.5:1 Automatic"). What I'd suggest doing is changing to 'undeformed' and then running this macro, so you know that it's your own specified scale factor, even though the Results toolbar says 'undeformed.'"

[permalink]
 
Average Rating: 10.0 (6 votes)  
Rate this item:
 
User_Fatigue_PNEN13445-3
  Przemyslaw Siedlaczek (MESco)
  Workbench macro solves fatigue according to pressure vessel code PN EN 13445-3 and displays results as a User Defined Result.
[permalink]
 
Average Rating: 10.0 (6 votes)  
Rate this item: