*Expert Elite*
753 Posts
54 Kudos
Registered: ‎02-13-2008
Post 11 of 12

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
141 Posts
2 Kudos
Registered: ‎08-23-2011
Post 12 of 12

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 interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!