Author Topic: Quick Question  (Read 4414 times)

0 Members and 1 Guest are viewing this topic.

pBe

  • Bull Frog
  • Posts: 402
Quick Question
« on: May 04, 2016, 01:27:47 AM »
New with .NET

Run a .Net program thru ODBX, possible?

Correct me if i'm wrong , XREF related stuff in Vlisp not working with ODBX (at least for me it doesn't :D)  , but is it possible with .NET?

Sheet Set modification with .NET?

EDIT: if .NET are considered as AutoCAD "command" < pBe is Totally unsure > does that mean it cannot be called from ODBX?
« Last Edit: May 04, 2016, 06:39:23 AM by pBe »

MexicanCustard

  • Swamp Rat
  • Posts: 705
Re: Quick Question
« Reply #1 on: May 04, 2016, 08:02:54 AM »
When you say "OBDX" are you referring to ObjectDBX? 

If so, the short answer is no. You cannot create custom objects in .NET.  That's an ObjectARX C++ only situation.
Revit 2019, AMEP 2019 64bit Win 10

pBe

  • Bull Frog
  • Posts: 402
Re: Quick Question
« Reply #2 on: May 04, 2016, 08:49:00 AM »
When you say "OBDX" are you referring to ObjectDBX? 

If so, the short answer is no. You cannot create custom objects in .NET.  That's an ObjectARX C++ only situation.

Yes, ObjectDBX. I was hoping the answer would be yes, So now that I know that its not possible, what you be the equivalent of ObjectDBX in .NET? (if any)

n.yuan

  • Bull Frog
  • Posts: 348
Re: Quick Question
« Reply #3 on: May 04, 2016, 09:20:08 AM »
Well, if you mean to use ObjectDBX in the same way as you do with VBA/COM (processing drawing without opening it in AutoCAD editor), then YES, with .NET API, opening a drawing in a side database is the equivalent (actually, they are the same thing under the hood exposed as .NET API or ObjectDBX COM API).

Your question is quite vague as what you really want to do, thus the answer could be either YES or NO, depending on anyone's guess. You also asked sheetset modification with .NET (inside or outside AutoCAD?). Again, it is Yes or No, both are possible legitimate answers  :tickedoff:

pBe

  • Bull Frog
  • Posts: 402
Re: Quick Question
« Reply #4 on: May 04, 2016, 10:06:50 AM »
Well, if you mean to use ObjectDBX in the same way as you do with VBA/COM (processing drawing without opening it in AutoCAD editor), then YES, with .NET API, opening a drawing in a side database is the equivalent (actually, they are the same thing under the hood exposed as .NET API or ObjectDBX COM API).

Yes, that is the intention, for most part, what I intending to do has everything to do with XREFS.

I had no success when dealing with XREFS thru ObjectDBX. Opened drawings.. No problem... but with ObjectDBX... no success. Even took the coreconsole route using native command call. not as pretty as I imagined it. Apparently VLISP does not work with CoreConsole, Entmod method for XREF modification did not cut it for me as well. So I'm now thinking of using .NET. If its possible then I will pursue it.

"Side database" sounds promising.

Now for Sheet Set. I know that Sheet Set Object is not exposed to Visual Lisp nor Vanilla. (not that I know of that is) . So .NET is probably the way to go. my first stop was  "Reference Links for LIBRARY Routine threads" of course, but I did not find any reference to Sheet Set hence the question "Sheet Set modification with .NET?" . [ Inside and outside ]

I'm very new with .NET (as in two days in), In my opinion theSwamp is the best place to start.

Your question is quite vague as........Again, it is Yes or No, both are possible legitimate answers  :tickedoff:

Apologies for the confusion.

Thank you kind sir.

pBe

ChrisCarlson

  • Guest
Re: Quick Question
« Reply #5 on: May 04, 2016, 10:14:37 AM »
Fortunately, the SSM has it's own API which is decently well documented (compared to others)

http://help.autodesk.com/view/ACD/2017/ENU/?guid=GUID-56F608AE-CEB3-471E-8A64-8C909B989F24

pBe

  • Bull Frog
  • Posts: 402
Re: Quick Question
« Reply #6 on: May 04, 2016, 10:21:42 AM »
Fortunately, the SSM has it's own API which is decently well documented (compared to others)

http://help.autodesk.com/view/ACD/2017/ENU/?guid=GUID-56F608AE-CEB3-471E-8A64-8C909B989F24

Nice, thank you ChrisCarlson :D

Much Appreciated.

ChrisCarlson

  • Guest
Re: Quick Question
« Reply #7 on: May 04, 2016, 10:33:31 AM »
I would not venture too deep right away with AutoCAD .NET, get the basics of C# (assuming) and .NET down first. I would say most .NET programs for AutoCAD are 90% c#/.NET language and 10% AutoCAD specific.

n.yuan

  • Bull Frog
  • Posts: 348
Re: Quick Question
« Reply #8 on: May 04, 2016, 12:27:56 PM »
I completely agree with ChrisCarlson that one needs to learn/master .NET basic prior jump into AutoCAD .NET API.

By the way, SheetSet API is exposed as COM API, which you can use with AutoCAD VBA. If you want to work with .NET, you still use SheetSet COM API (.NET interop).

With the task in hand, have you tried to work with ObjectDBX and SheetSet in VBA (since you only mentioned VLISP)? using VBA with ObjectDBX (to processiing drawing without opening in AutoCAD editor) may not be as powerful as using AutoCAD .NET API, but in terms of dealing SheetSet, there would be little difference between using VBA or AutoCAD .NET, because both use the same SheetSet API (COM API). While VBA may not be a good choice for a long term solution, it may just be enough to be the solution of you task, before you are capable of doing meaningful AutoCAD .NET API development.

pBe

  • Bull Frog
  • Posts: 402
Re: Quick Question
« Reply #9 on: May 04, 2016, 03:30:47 PM »

I would not venture too deep right away with AutoCAD .NET, get the basics of C# (assuming) and .NET down first.....

I completely agree with ChrisCarlson that one needs to learn/master .NET basic prior jump into AutoCAD .NET API.

You guys have a point there, i will take that into consideration.

...., but in terms of dealing SheetSet, there would be little difference between using VBA or AutoCAD .NET, because both use........, before you are capable of doing meaningful AutoCAD .NET API development.

If i were to learn to a new language, Think its best to go ahead and jump to .NET bandwagon. My first task would be Sheet Set Objects. I may not be capable now with .NET but i'll learn and i'm in it for the long haul :D

I would try to come with a workable solution within 3 days, at least to read Sheet Set custom properties information and be able to use that in conjunction with good 'ol Vanilla and Vlisp coding.
It would be greatly appreciated If any of you kind souls can direct me to a sample source code for SSO . :)

One more Q:

Why is there no ObjectARX for AutoCAD 2014 at Autodesk Developer Network ObjectARX page but there's a ObjectARX 2014 Wizard? Sorry for this silly question, .NET is totally new to me.
Thank you for all your help guys :)

NEXT: "side database"

ChrisCarlson

  • Guest
Re: Quick Question
« Reply #10 on: May 04, 2016, 04:00:35 PM »
I believe they only keep the last three versions of ObjectARX SDK available for download. The wizard simply sets up the required templates and what not for Visual Studio.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2145
  • class keyThumper<T>:ILazy<T>
Re: Quick Question
« Reply #11 on: May 04, 2016, 04:11:24 PM »
Yes, That is misleading pBe
Header reads :
Quote
For AutoCADŽ 2017, AutoCAD 2016, and AutoCAD 2015, and AutoCAD 2014
http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=785550

but objectARX for ac2014 is not in the download list
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
Re: Quick Question
« Reply #12 on: May 04, 2016, 09:53:38 PM »
Wish you luck buddy...can be a painful path.  Took me two or three years to get comfortable with .net and Civil 3d interface. I 'tend to learn the hard way though.

You'd be wise to heed the advice of others...the autocad part is easy when you understand the language, and the language can be used for much much more....otherwise, you'll be begging for "source" constantly and not really getting anywhere.
« Last Edit: May 05, 2016, 12:16:01 AM by Area51Visitor »

pBe

  • Bull Frog
  • Posts: 402
Re: Quick Question
« Reply #13 on: May 05, 2016, 02:32:51 AM »

Wish you luck buddy...can be a painful path......

Thank you for the heads-up Area51Visitor.

You'd be wise to heed the advice of others....otherwise, you'll be begging for "source" constantly and not really getting anywhere.

Duly Noted and thank you that thought, as for the "source", i wouldn't say constantly though, we have google to thank for that. I just find it easier to ask ( not beg ) those of already in the know.  this is a forum after all and a good one at that, are  we not here to help/encourage others ?

Anyhoo, .NET intrigues  me and not one to give up that easy. One grain of sand at a time

Question for you, where else do you think i can get a copy of ObjectArx2014? Though i have 2015 VSExpress/Civil 3D 2017, I still need to test the codes on 2015 as well as 2014. Is .Net downward compatible? 


EDIT: Found a source code for SSM http://adndevblog.typepad.com/autocad/2013/09/using-sheetset-manager-api-in-vbnet.html
« Last Edit: May 05, 2016, 03:10:28 AM by pBe »

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2145
  • class keyThumper<T>:ILazy<T>
Re: Quick Question
« Reply #14 on: May 05, 2016, 03:07:02 AM »

Try asking at the AutoDesk .NET Forum http://forums.autodesk.com/t5/net/bd-p/152

Some of the support people visit there and may have a link  through the back door for the 2014 SDK.
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.