Replies: 4 comments 4 replies
-
|
Yes, sources were generated by another tool that used AlibreScriptAddOn.dll (not AlibreX.dll). Reflected means I used .NET reflection to get the property and method signatures. The format: Was made for LLMs and scripting (example): # -*- coding: utf-8 -*-
# Stub for: AlibreScript.API.CircularArc
# IronPython 2.7 compatible (no PEP 484 types; use comments/docstrings)
try:
# If running under IronPython, prefer .NET's Object for nicer tooling
from System import Object
except Exception:
Object = object # Fallback for non-IronPython linters
__all__ = ["CircularArc"]
class CircularArc(Object):
"""
Stub for AlibreScript.API.CircularArc
Properties:
Center -> Point3D or Point2D (depending on API)
StartPoint -> Point3D or Point2D
EndPoint -> Point3D or Point2D
Start -> float (radians or degrees per API)
End -> float (radians or degrees per API)
CenterPoint -> Point3D or Point2D (alias of Center, if applicable)
Radius -> float
Angle -> float
Type -> enum/int/str (per API)
IsReference -> bool
Methods:
FigureObject() -> object
SetInstance(IADSketchFigureFigure) -> None
ToXml() -> object (e.g., XElement)
FromXml(XElementXml) -> None
"""
def __init__(self, *args, **kwargs):
# No-op: this is a stub for tooling/autocomplete.
pass
# --- Properties ---
@property
def Center(self):
# type: () -> object # Point2D/Point3D
return None
@Center.setter
def Center(self, value):
# type: (object) -> None
pass
@property
def StartPoint(self):
# type: () -> object # Point2D/Point3D
return None
@StartPoint.setter
def StartPoint(self, value):
# type: (object) -> None
pass
@property
def EndPoint(self):
# type: () -> object # Point2D/Point3D
return None
@EndPoint.setter
def EndPoint(self, value):
# type: (object) -> None
pass
@property
def Start(self):
# type: () -> float
return 0.0
@Start.setter
def Start(self, value):
# type: (float) -> None
pass
@property
def End(self):
# type: () -> float
return 0.0
@End.setter
def End(self, value):
# type: (float) -> None
pass
@property
def CenterPoint(self):
# type: () -> object # Point2D/Point3D
return None
@CenterPoint.setter
def CenterPoint(self, value):
# type: (object) -> None
pass
@property
def Radius(self):
# type: () -> float
return 0.0
@Radius.setter
def Radius(self, value):
# type: (float) -> None
pass
@property
def Angle(self):
# type: () -> float
return 0.0
@Angle.setter
def Angle(self, value):
# type: (float) -> None
pass
@property
def Type(self):
# type: () -> object # enum/int/str
return None
@Type.setter
def Type(self, value):
# type: (object) -> None
pass
@property
def IsReference(self):
# type: () -> bool
return False
@IsReference.setter
def IsReference(self, value):
# type: (bool) -> None
pass
# --- Methods ---
def FigureObject(self):
# type: () -> object
"""Return the underlying figure object."""
return None
def SetInstance(self, IADSketchFigureFigure):
# type: (object) -> None
"""Bind to an existing IADSketchFigureFigure instance."""
pass
def ToXml(self):
# type: () -> object # XElement
"""Serialize this arc to an XML element."""
return None
def FromXml(self, XElementXml):
# type: (object) -> None # XElement
"""Populate this arc from an XML element."""
passThe
The
https://github.com/stephensmitchell/alibre-script/tree/master/Alibre-Script.Reflected |
Beta Was this translation helpful? Give feedback.
-
|
That makes more sense, thank you.
Is this tool already published, or are you willing to publish it? I would love to try and meld that with the textual help from the Alibre-provided |
Beta Was this translation helpful? Give feedback.
-
Try the early release of the extension: |
Beta Was this translation helpful? Give feedback.
-
|
That appears to work great! I'll continue to test it out, let me know if there is anywhere I can help write docs or anything. Off-topic, but have you written anything to add "Form New Subassembly" and "Dissolve Subassembly" functionality to Alibre? If there's anything I would like to see done with the API, it's that. It's the #1 feature I miss from SOLIDWORKS and Fusion. |
Beta Was this translation helpful? Give feedback.














Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to figure out how to use your Alibre-Script.Reflected tool, and I'd like to know how the documentation was actually generated, starting with
AlibreX.dll. Here's what I understand so far:./sources/folder gets populated with text files describing all methods/properties. Where did this documentation come from? Is there another tool somewhere that generated this, or did you make it manually?.txtfile in./sourcesis converted to a "stub" Python file by./generate.py. This part makes reasonable sense to me.Can you explain where the
sourcesfolder content came from? And can you also explain what thebinfolder's contents are for? I'd love to know how to generate all these resources from scratch using these tools, on my own filesystem. If you can help me understand how to do it, I'll be happy to write some docs and PR them into your repo.Beta Was this translation helpful? Give feedback.
All reactions