*Expert Elite*
Posts: 753
Registered: ‎02-13-2008
Message 11 of 12 (84 Views)

Re: Overruled block using Explode method don't generate overruled entities.

07-26-2012 12:04 AM in reply to: JanetDavidson

I still haven't finished modifying my code yet.  I didn't get to work on it at all today.


Friend means "I can access this from anywhere inside the same assembly (.dll)"

Public means "I can access this from other assemblies."

Private means "I can only be accessed from within code in this level of code (Class, or Method depending on where it is declared)"


So if you declare things as Public, other assemblies could potentially call into your code.  You should only declare things as Public when AutoCAD requires it (like with Command Methods), or when you want to access it from another assembly.  Admittedly, that might be a low risk for you, as it is for me, and also admittedly, sometimes it is the desired behavior, like with my Cadtools .dll which I reference into all of my other projects.  I just thought I should mention it, in this case in particular, because it would seem that you should not provide other programmers with the means to Explode your custom objects.


"Shared" is a whole different animal altogether, and it is a little difficult to explain.  In the simplest terms I can come up with,  the opposite of "Shared", ie. anything NOT declared as Shared in VB, is an "Instance" variable (or object), meaning each instance of the class would have it's own instance of the variable.  If the variable or Object is declared as Shared, then there is only one instance of the variable that all instances of the class use.  Overrules should be Instantiated for each drawing that they apply to, so IMHO, you should not have a Shared variable for your Overrule.


I don't think I explained that very well, but I hope it helps.  When I finally finish putting my example together, it might help a little more.  I think now, after writing this, I will expand my example to be a complete project, instead of just a few methods that belong in a Class.


Right now, I've got to hit the sack.

Dave O.                                                                  Sig-Logos32.png
Distinguished Contributor
Posts: 139
Registered: ‎08-23-2011
Message 12 of 12 (80 Views)

Re: Overruled block using Explode method don't generate overruled entities.

07-26-2012 05:58 AM in reply to: chiefbraincloud

You could've been a teacher. It was good explanation. I understood it. I google it and could not understand those terms. ( Like Modifiers & initialized  & .... )

but your explanation was clear.



Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!