Hello everybody,
I´ve got a quick question. I am trying to create a component from the e-catalog via my python code. I want to place it in the 3d world, adjust the properties, rename it and place it. I am missing the function to load the geometry/thing from the e-cad. Can anyone point me to the right function/page in the python api? Or is there a .net code I have to call via python?
My code so far:
from vcCommand import *
def placeComponent():
print("HelloWorld")
#Get Application to use netCommands and do things in the Sim
app = getApplication()
cmd = app.findCommand("netCommand")
sm = app.SelectionManager
# Pyton for .Net syntax cmd.execute("ImportCADFiles", [True])
comp = app.createComponent()
comp.getProperty("Name").Value = "Test"
comp.createProperty(VC_INTEGER, "Test_int")
# Change this part from Block to Elements from the E-Catalog/ vcmx data
comp = app.findComponent("Test")
comp.RootFeature.createFeature(VC_BLOCK, "MyBlock")
sm.setSelection(comp)
print(comp)
sm.setSelection(comp)
print(comp)