.NET

.NET

Reply
*Expert Elite*
chiefbraincloud
Posts: 752
Registered: ‎02-13-2008
Message 11 of 12 (77 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
JanetDavidson
Posts: 139
Registered: ‎08-23-2011
Message 12 of 12 (73 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.

Janet.

 

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.