×
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

Simple API for View Options

Simple API for View Options

Simple API for View Options

(OP)
Does anyone have a simple API script for turning on Node IDs (only Nodes) that they'd be willing to share? Complete novice to API, and having some trouble with the syntax. That would be a huge help. Many thanks

RE: Simple API for View Options

Since you said you were new to the API, I wrote this one for you, you can edit this to test and see if node labels are already on, and if so, turn them off and make it a quick toggle. I added comments to each line to hopefully help with your FEMAP API learning -

Sub Main
' Connect to the current running FEMAP as App
Dim App As femap.model
Set App = feFemap()

' Create a new empty feView Object
Dim feView As femap.View
' Connect it to App
Set feView = App.feView

' Integer to hold the current view ID
Dim viewID As Long

' Find out what the current active view ID is
rc = App.feAppGetActiveView( viewID )

' Use the viewID and load the feView object with that
' view's settings
If feView.Get( viewID ) = femap.FE_OK Then
' Make sure nodes are being drawn, FVI_NODE is
' defined as "7" which is always nodes
feView.Draw( FVI_NODE) = True
' And turn on the labels
feView.Label( FVI_NODE) = 1
' take this API's feView object and update
' the one in the FEMAP database
rc = feView.Put( viewID )
' Force a regen so that this view gets redrawn
rc = App.feViewRegenerate( viewID )
End If

End Sub

RE: Simple API for View Options

(OP)
Awesome, much appreciated. And thanks for taking the time to comment, that helps a lot

RE: Simple API for View Options

mrFEMAP, are there any free resources to learn API programming? How did you learn if I may ask?

www.stressebook.com
Stressing Stresslessly!

RE: Simple API for View Options

That worked like a charm mrFEMAP. You are the boss.

Is there a repository of API programs you built I can get access to other than Custom Tools? That would be awesome. Please email me at stressebookllc at gmail dot com.

One of the tools I am looking for is to move a nodal load from one node to another.

www.stressebook.com
Stressing Stresslessly!

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!


Resources