CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > ANSYS Meshing & Geometry

[Other] PROBLEME on ACT APP Builder, SpaceClaim WIZARD

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 10, 2022, 13:24
Exclamation PROBLEME on ACT APP Builder, SpaceClaim WIZARD
  #1
New Member
 
Miguel Valentin
Join Date: Nov 2022
Posts: 1
Rep Power: 0
Le flemmard is on a distinguished road
HI,

I am coding a wizard for SpaceClaim.
And I have a problem. To tell you I have a functional script which when I inject it into SpaceClaim directly works without problem.
But when I run it through the wizard. I have 1 error, it changes depending on the .dll I import. I went to see the additional information on .chm but I'm still stuck on that.

Here is the python code and the first error :
Code:
import System
import clr
import sys
import os
import math

part = None
global part
win = Window.ActiveWindow
context = win.ActiveContext
part = context.ActivePart
global part
# get selected part
if part==None:
     win = Window.ActiveWindow
     context = win.ActiveContext
     part = context.ActivePart.Master
body = part.Bodies
se = Selection.Create(body) """ <----  the problematic line"""
ERROR : AttributeError: 'Selection' object has no attribute 'Create'

If i add this at the beginning :
Code:
clr.AddReference("SpaceClaim.Api.V22")
from SpaceClaim.Api.V22 import *
ERROR : AttributeError: attribute 'Create' of 'namespace#' object is read-only

If you have the solution, I thank you in advance for taking the time to answer, if not thank you for reading me.

Sincerely
Le flemmard is offline   Reply With Quote

Reply

Tags
act extension, namespace#, script error, spaceclaim, wizard


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 12:54.