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
- 3D Simulation - Femap Forum
- Can't add constraint sets in a constraint combinat...

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

11-27-2014 06:20 AM

Hello everybody!

I'm writing a routine that in certain point must create a combination of constraint sets (SPCADD) if none combination exists or add constraints in a preexisting constraint combination. I was able to create a constraint combination without any problem but when I tried to add constraints in a preexisting constraint combination, simply nothing happened. Below, follows a sample of I'm trying to do:

Sub Main 'Initialize variables. Dim App As femap.model Set App = feFemap() Dim BCSetAddID As Long Dim nSetID() As Long Dim i As Long Dim BC As femap.BCSet Set BC = App.feBCSet 'Create the constraint set that will 'receive the combination of sets. BCSetAddID = 90000000 BC.title = "SPCADD" BC.Put(BCSetAddID) 'Create the constraint sets that will 'be combined ReDim nSetID(3) For i = 0 To UBound(nSetID) nSetID(i) = BCSetAddID + i+1 BC.title = "Constraint " & i + 1 & "" BC.Put(nSetID(i)) Next 'Combine the constraint sets through a 'SPCADD BC.Get(BCSetAddID) BC.PutCombination(i,nSetID) BC.Put(BCSetAddID) '****************************************** 'Until here, everything works as I expected. 'The problem happens when I try to put some more 'constraint sets in the constraint combination 'as follows: '****************************************** 'Create some more constraint sets ReDim Preserve nSetID(7) For i = 4 To UBound(nSetID) nSetID(i) = BCSetAddID + i +1 BC.title = "Constraint " & i + 1 & "" BC.Put(nSetID(i)) Next 'Try to add the additional constrant sets 'in the preexisting constraint combination BC.Get(BCSetAddID) BC.PutCombination(i,nSetID) BC.Put(BCSetAddID) 'After put the modification I expected that the 'constraint combination was updated but instead 'of this, nothing happens. End Sub

Could somebody help me? What am I doing wrong?

Fabiano

Follow Siemens PLM Software

© 2017 Siemens Product Lifecycle Management Software Inc