turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Navigation
- Simcenter
- Forums
- Blogs
- Knowledge Bases

- Siemens PLM Community
- Simcenter
- CAE Simulation - Femap Forum
- Fast surface creation - Femap API

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-13-2017 12:45 PM

Hi all,

I would like to ask if somebody knows a fast method to create surfaces by loading node id's from excel. At the moment I use the code below, it works fine but its very slow when I want to put in a lot of surfaces. For nodes I use the putAllArray method which is really fast, I wonder if something similar is possible for surfaces?

Thanks for any help.

Regards,

Marcel

Sub Create_surfaces() 'Connect to femap Dim femap As Object Set femap = GetObject(, "femap.model") Dim Node As Object Set Node = femap.feNode 'Dim general items Dim iRow As Integer Dim start_row As Integer Dim start_column As Integer Dim Num_surf As Integer Dim Number_Input As Integer Dim RC1 Dim p1 As Double Dim p2 As Double Dim p3 As Double Dim p4 As Double 'Set the start of the input start_row = Range("S2") start_column = Range("S3") Num_surf = Range("S4") Number_Input = Range("S5") 'Dim coordinate sets for each node Dim c1, c2, c3, c4 ReDim c1(1 To 3) As Double ReDim c2(1 To 3) As Double ReDim c3(1 To 3) As Double ReDim c4(1 To 3) As Double 'Fill the coordinate sets for each node For j = 0 To Number_Input iRow = start_row For i = 1 To Num_surf p1 = Cells(iRow, start_column + 3) p2 = Cells(iRow, start_column + 4) p3 = Cells(iRow, start_column + 5) p4 = Cells(iRow, start_column + 6) Node.Get (p1) c1(1) = Node.x c1(2) = Node.y c1(3) = Node.z Node.Get (p2) c2(1) = Node.x c2(2) = Node.y c2(3) = Node.z Node.Get (p3) c3(1) = Node.x c3(2) = Node.y c3(3) = Node.z Node.Get (p4) c4(1) = Node.x c4(2) = Node.y c4(3) = Node.z 'Put the surface in femap RC1 = femap.feSurfaceCorners(True, c1, c2, c3, c4) iRow = iRow + 1 Next i start_column = start_column + 12 Next j femap.feViewRegenerate (0) End Sub

Solved! Go to Solution.

2 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-13-2017 12:51 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-13-2017 03:46 PM

Alright, just have to wait for the new release then.

Thanks for the reply.

Follow Siemens PLM Software

© 2018 Siemens Product Lifecycle Management Software Inc