Skip to content

Open a RFEM file, modify, safe the file under a new name and close it #355

Closed Answered by heetrojivadiya
tobiasneulichedl asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @tobiasneulichedl,

Thank you for sharing. I have corrected the file path. You can use any of the methods for assigning file path from below code.

import os
baseName = os.path.basename(__file__)
dirName = os.path.dirname(__file__)
print('basename:    ', baseName)
print('dirname:     ', dirName)
from RFEM.initModel import Model, openFile, saveFile, connectToServer, closeModel
from RFEM.BasicObjects.node import Node

connectToServer() # or use 'Model()'

openFile(dirName+'\Test.rf6')                                   # Method 1
Node(15, 15,0,0)
saveFile(r'C:\Users\RojivadivaH\Downloads\Test\Test_new.rf6')   # Method 2

Please make sure that you put your python file and .rf6 file in same r…

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@tobiasneulichedl
Comment options

@heetrojivadiya
Comment options

@tobiasneulichedl
Comment options

@heetrojivadiya
Comment options

Answer selected by tobiasneulichedl
@tobiasneulichedl
Comment options

@tobiasneulichedl
Comment options

@heetrojivadiya
Comment options

@tobiasneulichedl
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants