AnsweredAssumed Answered

Macro to create xyz curve feature

Question asked by Bill Bigbee-Hansen on Nov 16, 2019
Latest reply on Nov 16, 2019 by Bill Bigbee-Hansen

I am trying to create a macro which creates xyz curves from a set of text files.  I have code that will update existing data but want to automate the model set up.  I have used macros to create a series of named planes but am stumbling on how to create the curve feature. Following code was used to update curves.  

'*******************************************************************************************************
' read in section curves
For i = 1 To 10
   swModel.ClearSelection2 True
   section = sections(i) & "cv"
   bRet = swModel.Extension.SelectByID2(section, "REFERENCECURVES", 0, 0, 0, False, 0, Nothing, 0)
   Set swFeat = swSelMgr.GetSelectedObject6(1, -1)
   Set swFeatData = swFeat.GetDefinition
   Path_and_file_name = Current_Dir & "\Section_" & sections(i) & ".SLDCRV"
   bRet = swFeatData.LoadPointsFromFile(Path_and_file_name)
   swFeat.ModifyDefinition swFeatData, swModel, Nothing
Next i
'*******************************************************************************************************
Any suggestions would be appreciated

Outcomes