Cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the property NasBulkStartText?

Valued Contributor
Valued Contributor

Hello, everybody!

 

I can't use the property NasBulkStartText of the AnalysisMgr entity. The Femap API manual indicates that the text ID must be supplied, but I don't know how to create this text entity. I tried the following code, but didn't work.

 

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

    'Insert Linear Gap PARAMs into the Analysis Set.
	Dim BulkTextID As Long
	Dim BulkText As femap.text
	Set BulkText = App.feText()

	With BulkText
		.text = "Test"
		BulkTextID = .NextEmptyID
		.Put(BulkTextID)
	End With

'Create the Analysis Set
	Dim AnaSet As femap.AnalysisMgr
	Set AnaSet = App.feAnalysisMgr
	Dim AnaSetID As Long

	With AnaSet
	        .Solver = FAM_MSC_NASTRAN
	        .AnalysisType = FAT_STATIC
	        .title = "TEST"
	        .NasBulkStartText = BulkTextID
	        AnaSetID = .NextEmptyID
	        .Put (AnaSetID)
	        .Active = AnaSetID
        End With

End Sub

 

 

Does somebody could help me?

 

Fabiano.

1 REPLY

Re: How to use the property NasBulkStartText?

Valued Contributor
Valued Contributor

Hello, everybody!

 

I was rereading my previous message and realized that I made some mistakes in English. I would like to apologize. English is not my native language...

So, I found out how to use the property NasBulkStartText... I thought that the ID required by this property was a ID of a fetext entity, but it wasn't. This ID must be generated using the PutText method of feAnalysisMgr entity. Below, I rewrote the code of my previous message, using this method and it worked properly.

 

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

'Create the Analysis Set
	Dim AnaSet As femap.AnalysisMgr
	Set AnaSet = App.feAnalysisMgr
	Dim AnaSetID As Long
	Dim BulkTextID As Long

	With AnaSet
	        .Solver = FAM_MSC_NASTRAN
	        .AnalysisType = FAT_STATIC
	        .title = "TEST"
			BulkTextID = .PutText(0,"Test")
	        .NasBulkStartText = BulkTextID
	        AnaSetID = .NextEmptyID
	        .Put (AnaSetID)
	        .Active = AnaSetID
        End With

End Sub

 

Best regards,

 

Fabiano.