2,614 questions
2
votes
1
answer
102
views
Calling the Remove() method on a Newtonsoft.Json.Linq.JObject in IronPython app throws a ' NoneType is not callable' error
When debugging ironpython app in Visual Studio, I have confirmed the JObject's instance extendObj is not null, why does the extendObj.Remove method throw the error? in the 'Watch 1' window i can ...
1
vote
1
answer
103
views
Spotfire toggle shuffles back to left while navigating to different page
I'm encountering an issue with a toggle switch embedded inside a text area that allows users to switch between viewing the top 15 and bottom 15 sales on a bar chart. The logic for toggling between ...
0
votes
1
answer
75
views
Is there a way to get Revit Python Shell not to buffer the print statement?
Is there a way to get Revit Python Shell not to buffer the print statement?
For example, with this code, it is clear to see that RPS will not show anything on the screen until after the loop has ...
0
votes
0
answers
104
views
How do I include the os module with IronPython 3.4 in my C# project, and also run a script? [duplicate]
I am attempting to use IronPython 3.4 with my C# / .NET MAUI project. As IronPython 3.4 is pretty new, I am not sure if there is much support for it yet.
As a part of experimentation, I am attempting ...
1
vote
2
answers
60
views
How can i understand what is running IronPython or Python?
With what command inside code can I understand that IronPython or Python is running?
-1
votes
1
answer
84
views
When i run inversetest.py in wpf app, I get error on predict model
When I run python code in c#, I get error on line of predict model but it run in python well. I used any way such as python.net, ironPython, Process,... but it did not work:
private void ...
0
votes
0
answers
32
views
What files does IronPython require in the C:\Python27 folder?
We use IronPython 2.7 in a desktop app, which is used to programmatically run simple Python scripts which might import standard modules like 'sys', 'time', and so on. It retrieves these from the C:\...
1
vote
1
answer
40
views
Given a font and a specific character, is there a way to tell which subrange the character belongs to?
I need to determine if a given character in a given font belongs to a given subrange. For example, U+0041 according to Windows Character Map app belongs to the Latin Subrange. Is there a way to get ...
0
votes
1
answer
131
views
Embedded IronPython debugging with breakpoints
Our codebase is written mostly in C# with some scripting capabilities using IronPython 3.4. Until recently we based the project on the outdated .Net Framework 4.8 but made the move to .Net 8 recently.
...
0
votes
0
answers
97
views
Using ironpython from C# async-await causes the app to hang
From C# we have to call python function, in this case the nltk lib lemmatize function (which still has no good C# implementation). We call it like this:
private string Lemmatize(string word)
{
using (...
0
votes
1
answer
223
views
How do I add IronPython Interpreter in PyCharm?
I'm working with some API's that require IronPython and I use JetBrains' Pycharm to code. The only problem is that, after formatting my PC, I can't add the IronPython 3.4 interpreter to it.
I tried ...
0
votes
1
answer
95
views
How to use iopen pyxl in C#?
Im creating a Windows Forms Project based on C# using python scripts. But when click the button, which should start a python script i have an error "No module named 'openpyxl'"
private void ...
0
votes
1
answer
97
views
Creating a winform ironpython 3 Project in VSCode Community 2019
I have no clue what i am doing wrong
I have ironpython and winforms installed and vscode sees both
I don't have any options for IronPython Project when creating a new project, what can i do to have ...
0
votes
0
answers
46
views
Unhandled exception: When importing my Deep learning python code on C#
Heads Up:
I am using Visual Studio 2022
My python code consists of a machine learning model which is getting trained. So it has python libraries imported within the Python code (Ex: Import numpy as ...
0
votes
1
answer
358
views
spotfire ironpython : undo add rows / undo replace values
I'm working on a spotfire script to build up a data table row by row from a data table each time I press a button. At the same time I'm replacing values in the data table. The newly generated table is ...
2
votes
3
answers
274
views
Pylint syntax error not suppressing despite the `disable` comment
I'm writing scripts for Ansys Mechanical, which are written in IronPython 2.7.0.40. In my script, I need to assign a property to ContactTimeStepControls.None. Note that the None here is NOT the None ...
0
votes
2
answers
120
views
IronPython garbage collection - How does it provides compatibility with C-extensions?
In this part of the talk on GIL by Larry Hastings, there is an explanation about how ironclad provides C-extension compatibility with IronPython. This is the interesting part of the talk:
We ...
0
votes
0
answers
45
views
Why my python code doesn't print in a separate thread? (IronPython)
I'm not sure, what I did wrong:
So, I started a thread with the ThreadStart()-delegate from the .net-libary.
It's delegating to another method.
In the method I have a for-loop.
But when I'm looking in ...
0
votes
1
answer
174
views
Method with default struct argument other than the default struct
We have a struct called Vector3D and for some methods we want the (default) zero vector as default argument but for others we want a different, non-default vector (say, a unit vector in x ditrection) ...
1
vote
0
answers
93
views
How to integrate IronPython to run a embedded Python Script
I have 2 Python Scripts embedded into my C# Application. Essentially; 1 python script is a Decode Script and the other Script is to Encode. The idea that I have is; how can I execute these python ...
1
vote
0
answers
206
views
IronPython 3.4.1 in Unity
I'm creating a game on Unity 2023.2.2f1 where the player writes code and I need to execute the code as a Python file. Is it possible to do that with IronPython?
I connected it but I can't seem to get ...
2
votes
0
answers
155
views
Exporting Spotfire visualizations to template Powerpoint
I'm trying to export the visualizations in Spotfire into a Pre-made company Powerpoint, where specific visualizations going into specific places in the Powerpoint.
I've tried following this article: &...
0
votes
1
answer
344
views
How can I get IronPython in C# to run a script that requires an active VENV? Is this possible?
I've installed IronPython 3.4 (https://github.com/IronLanguages/ironpython3/releases/tag/v3.4.1) and I'm trying to run several font-related python scripts that depend upon an active VENV (FontTools, ...
0
votes
1
answer
361
views
How to Reload Individual Data Operations in TIBCO Spotfire Using IronPython Scripting
I am trying to reload an individual Data Operations in Spotfire Using IronPython Scripting but I can't.
I found a solution on TIBCO community but i t doesn't work. it's this one:
from Spotfire.Dxp....
0
votes
2
answers
742
views
Trying to run Python Code on .NET using Ironpython
I am trying to run a simple python code using C# using Iron Python Package.
Why it throws the below error (attached in screenshot)
The code runs fine if i don't import libraries,
but it throws error ...
0
votes
1
answer
90
views
Visual Scripting Error After Importing IronPython3.4.1
I imported IronPython3.4.1 into my unity project and I have received these error does anyone know how to fix this?
I tried deleting and re importing IronPython but that didn't work and I do now know ...
0
votes
1
answer
57
views
How can I create in IronPython a Variant holding an array of doubles to be passed to AutoCad?
I am using IronPython to modify an Autocad file using COM/ActiveX. Reading information from the file is going well but now I want to move a line in the cad file.
The Move command is looking for two ...
0
votes
1
answer
890
views
How to fix VS Code autocompletion to access all layers of a Python.NET - .NET assembly interface?
I am programming in Python 3 in VS Code, using Python.NET to interface with a .NET based API (AudioPrecision.API.dll). I want to use autocomplete similar to Intellisense in Visual Studio, to make it ...
1
vote
1
answer
396
views
SytemError when trying to run progress bar when executing a script in spotfire
When trying this basic code snippet to test out a progress bar, I get error message "SystemError: Attempt to execute a ProgressOperation in the context of a document transaction.".
from ...
0
votes
1
answer
111
views
how access data during intermediate transformation steps before final data table (i.e. need a column before it is pivoted)
Table1 is loaded as a data source, then undergoes some transformations (replace columns, join columns, etc.) from other tables and then outputs Table1Final.
One of the transformations pivots ColumnA ...
0
votes
1
answer
90
views
How does an Indexer work with a FilteredElementCollector?
I am reading data in from CSV text file where each line in the file is a distinct record. In that record is the name of a text style which I need to convert to the elementID of a TextNoteType.
I have ...
1
vote
1
answer
235
views
IronPython 3.4 with dotnet 6 facing problem
I am trying to create a sample dll with a function that adds two integer.
I created a dll for that.
Process to create the dll ===>
Used VS2022 and created dll with .Net core6
sample code used
...
0
votes
1
answer
2k
views
Spotfire ironpython replacing data table values
in Spotfire I'm trying to write a string into marked rows of a table column.
from Spotfire.Dxp.Data import *
dataTable = Document.Data.Tables["myTable"]
cursor = DataValueCursor....
0
votes
0
answers
293
views
IronPython v Python 3.11 - Importing .dll Libraries in Python 3.11
I am having an issue importing a .dll library in Python 3.11.
For IronPython, the import is successfull and looks as follows (example is for using the API of a structural analysis package called Robot ...
2
votes
0
answers
469
views
How do you change the linestyle of a detail line in Revit?
After banging my head for awhile trying to figure out how to change - using the Revit API - the linestyle of an existing detail line to another given the name of the linestyle, I finally figured it ...
0
votes
1
answer
442
views
How to change the width of a tableplot in spotfire via ironpython
This can be done manually by dragging the borders, but is there a way to set the width of the visualization (not the columns within the visualization) to a set width?
0
votes
1
answer
1k
views
How to set a filtering scheme to data function input via ironpython?
I am executing a data function via ironpython, and the input is predefined (a column from an existing data table). Now I would like to filter this input by applying a filtering scheme to it. How do I ...
0
votes
1
answer
360
views
How can I draw a curve based on expression via ironpython?
In my scatterplot visualization, I added a "Curve from Data Table" with a custom expression that references variables from this data table. How can I do this via ironpython?
1
vote
0
answers
55
views
Can I install/use Python Log Indenter with Revit Python Shell?
I would like to install Python Log Indenter (Document Page ) for use with RevitPytonShell (IronPython version). The docs for Python Log Indenter indicate that PIP be used for installation but I am not ...
0
votes
1
answer
335
views
Why can I not cast my filter as listboxfilter in ironpython?
The result of my .AsListBoxFilter is None, as per the error message AttributeError: 'NoneType' object has no attribute 'SetValues'. I see no reason why this would fail, since my data is categorical.
...
1
vote
1
answer
159
views
Failed to import external libraries in IronPython
I want to run a Python application with IronPython.
This is the error:
Unhandled exception. IronPython.Runtime.Exceptions.ImportException: Cannot import name IntFlag
at Microsoft.Scripting.Runtime....
0
votes
1
answer
383
views
Installing IronPython on Ubuntu Using Mono
I am trying to install IronPython On Ubuntu 22.04 using Mono. I've followed each of the steps mentioned here - https://davidtavarez.github.io/2018/installing_ironpython/, but I'm still unable to ...
0
votes
0
answers
100
views
IronPython: no module named 'nltk'
i use ironPython last version 3.4.1 in Nuget (https://www.nuget.org/packages/IronPython/3.4.1#readme-body-tab)
so, i got simple .py file with that code (let's name it test.py):
import nltk
def ...
0
votes
0
answers
172
views
I can use Ironpython in my workplace lap but not in my personal pc, with Visual Studio Code 2022
I want to use iron python with visual code in my home pc, the problem is that I can not, the weird thing is that in the laptop which I work I can do it, I do not know what could be missing in my home ...
0
votes
1
answer
149
views
Spotfire Ironpython: Filters disappear after running a table through script?
I have a data table that I put into a script in a button. It takes the table and formats various visualizations on it, but after it goes through, the items in the filter bar on the right disappears ...
0
votes
1
answer
279
views
Attach VS Code to IronPython
I am attempting to attach the VS Code debugger to an application that is hosting IronPython from a nuget package. This does not work as Visual Studio Code returns this error:
This is my Script.cs ...
0
votes
1
answer
88
views
Redirecting output not working after upgrading to IronPython 3
I've upgraded from IronPython 2 to IronPython 3, but after upgrading I am no longer able to get output.
My class:
public class UnityLogWriter : StreamWriter
{
private readonly Action<string> ...
0
votes
1
answer
1k
views
Ironpython in spotfire to change the active datatable or visualization?
I was hoping someone would be able to help me figure out how to change the currently active datatable and/or visualization using IronPython in Spotfire. I currently have a button configured to run an ...
0
votes
1
answer
122
views
How to get a Python Style Traceback in Ironpython3?
I have a script that can run a python string but if there is an error I want to be able to get a string formatted like a standard python error.
I'm using IronPython 3.4
This is the C# code I currently ...
0
votes
1
answer
191
views
Most efficient way to calculate and remove overlapping timelines from one timeline in Spotfire
I have a question about timelines in Spotfire.
I have a script that takes two timelines from several machines and tasks.
-One timeline shows all the task times from several tasks per machine
-One ...