I've tried recording a macro while changing default display settings, but it doesn't record. Is it possible to change these settings with a macro? If so, what is the syntax?
I'm using Moldflow Insight 2011 SP2.
Hi,
when changing M>Options tab Default Display, the display will be set for all geometries no matter on which layer it is.
To change the display, it is controlled by LayerManager and LayerManager.SetTypeDisplayOption.
as same kind of entity can be displayed different, depending on which layer it belongs to.
If you record a macro changing display by :
on a layer with wished entity: rightclick and select Display...
change display settings and stop recording and view the macro created you will see what code looks like.
Via Help- API Reference you can find more:
In the Synergy Ribbon UI, you have the question mark at upper right corner:
Click on the small arrow down just to the right of the question mark:
select "API reference"
and class LayerManager
Hope this helps.
Regards,
Berndt
Great! Now is it possible to set up a loop to change the display of all layers or is it possible to change all layers at once?
When I recorded the macro, I changed the display of two layers. The macro recognized the layers as L33 and L75. Can we only refer to the layer by it's number? Or can we select a layer based on layer names?
If I wanted to change the display for beams on all layers, say, axis line only... is there a command to change all layers at once, or would I have to use something like:
Hi,
there is a way to loop through layers and set display as:
Set LayerManager = Synergy.LayerManager()
Set LayerID = LayerManager.GetFirst()
While Not LayerID Is Nothing
LayerManager.SetTypeDisplayOption LayerID, "B", "Axis Line Only"
Set LayerID = LayerManager.GetNext(LayerID)
Wend
This should display beams as you wish on all layers.
Regards,
Berndt