Author Topic: when use ARX?  (Read 6401 times)

0 Members and 1 Guest are viewing this topic.

jtm2020hyo

  • Newt
  • Posts: 180
when use ARX?
« on: April 14, 2020, 06:01:09 PM »
Hi, new in ARX, when is it recommended to use anything related to ARX?

MickD

  • Gator
  • Posts: 3492
  • (x-in)->[process]->(y-out)
Re: when use ARX?
« Reply #1 on: April 14, 2020, 07:41:08 PM »
When you really need a more secure code base (that is, hard(er) to decompile to look at the source code) to protect IP, you need an API not available via .Net or you have a very intensive data crunching application that require squeezing out every last bit of performance out of your processor.

The .Net (C#/VB.net/F# etc) API for ARX has pretty much the whole ObjectARX API covered and you could possibly PInvoke or wrap what isn't. You also have access to WinForms and WPF for GUI programming which is a LOT easier than dealing MFC/Win32 or a third party  C/C++ GUI library.
While .Net is a bit slower to get going being JIT compiled by nature, after being compiled once it's just as fast as the native code with some minor fluctuations/exceptions not really worth worrying about unless performance is absolutely critical (we're talking milliseconds here!).
The other advantage with .Net is maintenance, rarely do you need to update or recompile code for later releases of AutoCAD whereas with ObjectARX/C++ you need a full recompile each major file format release. Then there's the refactoring for C++ versions...

C++ is fun to use but be prepared for a lot of work unless you use it every day, if you need to get things done, use C#.
Forth is like the Tao: it is a Way, and is realized when followed.
Its fragility is its strength; its simplicity is its direction - Michael Ham

"First, solve the problem. Then, write the code." John Johnson

jtm2020hyo

  • Newt
  • Posts: 180
Re: when use ARX?
« Reply #2 on: April 14, 2020, 08:07:47 PM »
how can I start with .NET?

for example:
for lisp, I search similar lisp to my needs, then I change Line 3 and Line 4

for .NET, I tried to search for some code that simulates REPLACEBLOCK command, for replacing in AutoCAD MEP, Devices for blocks and vice-versa, no luck.
for .NET again, I tried to search for some code that converts polylines to Conduit or Cable Trays Objects vice-versa, in AutoCAD MEP, but no luck.

then some questions:

1 How can I start since zero to create both codes in NET?
2 Why does it not exist code in NET for common problems?
3 Is NET or AutoCAD MEP begin deprecated and replaced for REVIT and Dynamo?


MickD

  • Gator
  • Posts: 3492
  • (x-in)->[process]->(y-out)
Re: when use ARX?
« Reply #3 on: April 14, 2020, 09:45:16 PM »
Why don't you want to keep using lisp? It's very capable and easier to use and as you say there is plenty of examples to pick from to create your own versions.

As John mentioned in your other thread on C++, you will be moving from a higher level, interpreted 'scripting' language (AutoLisp) to a compiled 'programming' language and as far as compiled languages go C# is by far the easiest with more code samples (compared to C++ and for general .Net at least).

When you move to a lower level it does give you a lot more power and flexibility but there is less hand holding and you need to study and practice/write a lot more code to get the hang of things and how it all works together. We're talking maybe months to years (depending on you understanding of lower level programming) to be really productive.

If you know lisp, keep going with it and move slowly into say C# or C++/ARX and just get a small app with a command working and build upon that.
The key to understanding ObjectARX (C#/C++) is to understand how the document/editor/database works and you just need to keep looking for tutorials and sample code and eventually it will click.

Here's a start -> https://help.autodesk.com/view/OARX/2019/ENU/
For C# look at the links for the ObjectARX Managed .Net Developers and Reference guides.
For C++ look at the links for the ObjectARX Developers and Reference guides.

hth
Forth is like the Tao: it is a Way, and is realized when followed.
Its fragility is its strength; its simplicity is its direction - Michael Ham

"First, solve the problem. Then, write the code." John Johnson

MickD

  • Gator
  • Posts: 3492
  • (x-in)->[process]->(y-out)
Re: when use ARX?
« Reply #4 on: April 14, 2020, 09:46:38 PM »
There's also a pinned link here at The Swamp with heaps of info -> https://www.theswamp.org/index.php?topic=32381.0
Forth is like the Tao: it is a Way, and is realized when followed.
Its fragility is its strength; its simplicity is its direction - Michael Ham

"First, solve the problem. Then, write the code." John Johnson

jtm2020hyo

  • Newt
  • Posts: 180
Re: when use ARX?
« Reply #5 on: April 14, 2020, 11:20:12 PM »
thanks a lot for your help. I will learn everything as possible.

... but actually I just have 2 problems,


Quote
for .NET, I tried to search for some code that simulates REPLACEBLOCK command, for replacing in AutoCAD MEP, Devices for blocks and vice-versa, no luck.
for .NET again, I tried to search for some code that converts polylines to Conduit or Cable Trays Objects vice-versa, in AutoCAD MEP, but no luck.

As I mentioned, I need one alternative for REPLACEBLOCK command in AutoCAD MEP and convert any type of *line to Conduit, Cable Tray, Duct, Pipe, or any object with length and vice-versa. I am searching for help desperately and I do not know how to solve this.

I was posting for help in another forum, but no luck. Just a guy, in Autodesk Autocad MEP forum, suggest me search for .NET code to realize this and solve both.

I appreciate in advance to everyone for any help.

MickD

  • Gator
  • Posts: 3492
  • (x-in)->[process]->(y-out)
Re: when use ARX?
« Reply #6 on: April 15, 2020, 12:57:52 AM »
Your 2 problems require more than a 5 minute solution....

As I said, if you read the doc's and understand what a BLOCK is then REPLACEBLOCK won't be so hard ;)
Learn the basics of Entities and the database then things like Cable Trays should/might have an API you can hook into to do your thing. Get the properties for the line, create the cable tray setting the necessary properties from the line and add it to the database.

If someone has done it they might share what they have or have ideas, if not you will have to work it out yourself.
If you do go it alone then make a start and ask here or in the .Net section for help when you get stuck.

If you're really in a hurry it would be much more affordable and quicker to hire an experienced AutoCAD programmer, preferably with experience in MEP.
Like I said, you will be looking at months not hours or days to get this done without experience.
Forth is like the Tao: it is a Way, and is realized when followed.
Its fragility is its strength; its simplicity is its direction - Michael Ham

"First, solve the problem. Then, write the code." John Johnson

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: when use ARX?
« Reply #7 on: July 29, 2020, 01:30:43 PM »
You can also utilize OpenDCL (free) for C++ level GUIs  Its very robust.

www.opendcl.com
James Buzbee
Windows 8

jtm2020hyo

  • Newt
  • Posts: 180
Re: when use ARX?
« Reply #8 on: July 29, 2020, 07:55:05 PM »
You can also utilize OpenDCL (free) for C++ level GUIs  Its very robust.

www.opendcl.com

Sound very interesting, open DCL work for .net or java? Please share some samples with source code

d2010

  • Newt
  • Posts: 199
Re: when use ARX?
« Reply #9 on: August 18, 2021, 02:12:39 AM »
When you really need a more secure code base (that is, hard(er) to decompile to look at the source code) to protect IP, you need an API not available via .Net or you have a very intensive data crunching application that require squeezing out every last bit of performance out of your processo

Now You can secure LISP directly in ascii-lisp.txt, for anti-decompile .Lisp even, from .Vlx or .fas , or .Des
(clickHere+ClickHere "You always, you keep the Osmode=207, otherwise Failed")
« Last Edit: August 18, 2021, 02:16:40 AM by d2010 »