kato01
Full Member level 2
- Joined
- Dec 2, 2002
- Messages
- 127
- Helped
- 6
- Reputation
- 12
- Reaction score
- 3
- Trophy points
- 1,298
- Activity points
- 846
I am tring to build a COMSOL project file from EXCEL using the COMSOL excel addon.
My code shown below fails on the "GEO Line.
I get this error:
Anybody can help?
Thank you
My code shown below fails on the "GEO Line.
I get this error:
"wrong number of arguments or invalid property assignment"
Anybody can help?
Thank you
Code Visual Basic - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Sub comsol_vbs_test() Set comsolutil = CreateObject("comsolcom.comsolutil") Set modelutil = CreateObject("comsolcom.modelutil") Call comsolutil.TimeOutHandler(True) Call comsolutil.StartComsolServer(True) Call modelutil.Connect Set modelutil = CreateObject("ComsolCom.ModelUtil") Dim model As ModelImpl Set model = modelutil.Create("Model") Call model.modelPath("G:\MyDocuments\comsol\PROJECTS") Call model.Comments("Untitled" & vbNewLine & "" & vbNewLine & "") Call model.ModelNode().Create("comp1") Call model.geom().Create("geom1", 2) Call model.get_geom("geom1").axisymmetric(True) Call model.mesh().Create("mesh1", "geom1") Call model.physics().Create("emw", "ElectromagneticWaves", "geom1") Call model.study().Create("std1") Call model.get_study("std1").Create("freq", "Frequency") Call model.get_study("std1").get_feature("freq").Activate("emw", True) Call model.get_component("comp1").geom("geom1").Create("c1", "Circle") Call comsol_server_disconnect End Sub Sub comsol_server_disconnect() Set comsolutil = CreateObject("comsolcom.comsolutil") Set modelutil = CreateObject("comsolcom.modelutil") Call comsolutil.TimeOutHandler(True) Call modelutil.Disconnect End Sub