Cancel
Showing results for 
Search instead for 
Did you mean: 

API Control Entity Visibility of Properties

Pioneer
Pioneer

Hi

I am trying to use the following command for dynamically control the properties by using Femap 10.0.2

 

 

    App.feEntityVisibility (FVIS_PROP, p2set.ID, False, True)

 

 

Observing the following error in Femap

 

Basic Error (Line 32, Offset 0): (10091) ActiveX Automation: no such property or method

 

is this Activex supported in Femap 10.0.2, any alternative to use this

 

regards

srini

 

 

6 REPLIES

Re: Control Entity Visibility of Properties feEntityVisibility - API

Siemens Phenom Siemens Phenom
Siemens Phenom

It appears that method was added in FEMAP 10.1.0, next version after 10.0.2.

 

You could use Groups instead. Ex:

 

Sub Main
    Dim App As femap.model
    Set App = feFemap()

    Dim p2set As Set
    Dim g As Group
    Dim v As View, viewID As Long

    Set p2set = App.feSet
    Set g = App.feGroup
    Set v = App.feView

    App.feAppGetActiveView(viewID)
    v.Get(viewID)

    p2set.AddRange(1,2,1)

    gID = g.NextEmptyID()

    g.SetAdd(FT_PROP,p2set.ID)
    g.title = "Properties_API"
    g.Put(gID)
    g.Active = gID

    v.Group = gID
    v.Put(viewID)

End Sub

Re: Control Entity Visibility of Properties feEntityVisibility - API

Pioneer
Pioneer

hi Rcatania

Thank you so much for your Code. It helped me in getting the changes

 

Regards

srini

Re: Control Entity Visibility of Properties feEntityVisibility - API

Experimenter
Experimenter

How to use these codes?

Re: Control Entity Visibility of Properties feEntityVisibility - API

Siemens Phenom Siemens Phenom
Siemens Phenom

Open the API pane within FEMAP, then paste or type the lines of the program above.  When you click the green "Play" button the program will run.

 

API.png

 

Additionally, you can copy the lines above, paste into a text file, then change the extension to ".bas".  Now, you can place the file in your Custom Tools folder or User Tools folder and run the program with one click from the icons within FEMAP!

 

CUSTOM TOOLS.png

Re: Control Entity Visibility of Properties feEntityVisibility - API

Experimenter
Experimenter
My Femap 10.0.2 seems not to have Visibility command, how do i add it?

Re: Control Entity Visibility of Properties feEntityVisibility - API

Siemens Legend Siemens Legend
Siemens Legend

@Mtaki

Right click near the toolbar area and select Panes. It should become visible.

Panes Toolbar.png

You can also access it by Tools > Programming > API Programming
API Programming Menu bar.png