Sub test_comment()
' get interface from the opened model and lock the licence/program Dim iModel As RFEM5.IModel3 Set iModel = GetObject(, "RFEM5.Model") iModel.GetApplication.LockLicense
On Error GoTo e Dim iModelData As RFEM5.IModelData2 Set iModelData = iModel.GetModelData Dim iGuiObj As RFEM5.IGuideObjects Set iGuiObj = iModel.GetGuideObjects Dim comm As RFEM5.Comment ' set frame type comm.Frame = CircularFrameType ' set reference object type comm.ObjectType = GeneralObjectType comm.ObjectNo = 1 ' set point if GeneralObjectType is choosen comm.Point.X = 2 comm.Point.Y = 4 comm.Point.Z = 6 ' set offset from reference object comm.Offset.X = 0.5 comm.Offset.Y = 1 comm.Offset.Z = 1.5 comm.Rotation = 1 ' set text of comment comm.Text = "testcomment" ' transfer object to program iGuiObj.PrepareModification iGuiObj.SetComment comm iGuiObj.FinishModification e: If Err.Number <> 0 Then MsgBox Err.description, , Err.Source Set iModelData = Nothing iModel.GetApplication.UnlockLicense Set iModel = Nothing
End Sub
Question
How can I create a comment via the COM interface?
The direct interface with Revit allows you to update the Revit model according to the changes you have made in RFEM or RSTAB. Depending on the modification, the Revit objects may have to be regenerated (deleting the object and subsequent regeneration). The regeneration is performed on the basis of the RFEM/RSTAB model.
If you want to avoid this regeneration, activate the check box 'Update only materials, thicknesses, and sections'. In this case, only the properties of the objects will be adjusted. Changes different from those in material, surface thickness, and section are, however, not considered in this case.
When exchanging data with Advance Steel using *.smlx files, the interface is detected automatically. This means that *.smlx files can be created even if no version of Advance Steel is installed.
Use the "Independent mesh preferred" option in the FE mesh settings to create an independent FE mesh for the integrated objects. This allows you to generate a significantly more detailed and precise FE mesh for individual objects that are integrated into one another.
In the "Edit Section" dialog box, you can display the buckling shapes of the Finite Strip Method (FSM) as a 3D graphic.