Jump to content

Example .NET Jigging: A parabola parable


Recommended Posts

  • 1 year later...
  • Replies 56
  • Created
  • Last Reply

Top Posters In This Topic

  • SEANT

    26

  • Lee Mac

    16

  • wannabe

    6

  • khoshravan

    4

Top Posters In This Topic

Posted Images

khoshravan

Attached is the source code as well as a compiled dll if anyone is willing to give it a test drive.

 

http://www.cadtutor.net/forum/showpost.php?p=233991&postcount=34

 

Sorry for newbe level question. I DL your file. How can I use (perhaps import) them in ACAD?

Also you put the source code in a txt file. Is it easier to use it comparing to dll file? How can I use this one?

Link to post
Share on other sites

The DLL is more easily used. It is loaded via:

 

Command: [color="green"]netload[/color]

 

Browse for CsParabola.dll

 

Then, to run the commands either:

 

Command: [color="Green"]pvf[/color]

 

For parabola via vertex and focus selection, or:

 

Command: [color="green"]pbb[/color]

 

For parabola by bounding box selection.

 

 

I haven’t been able to test this on AutoCAD 2007. Please let me know how it performs.

 

Another note; Direct Distance Entry is not yet implemented.

Link to post
Share on other sites
khoshravan

 

 

I haven’t been able to test this on AutoCAD 2007. Please let me know how it performs.

 

I tried it but it gave following error message:

 

Unhandled exception has occurred in a component in your application. If you click Continue, the application will ignore this error and attempt to continue.

Exception has been thrown by the target of an invocation.

Details Continue

 

I clicked continue but it returned the command prompt.

 

In detail it says:

Application does not support just-in-time (JIT)

debugging. See the end of this message for details.

 

It it goes OK, is it necessary to load it each time?

Link to post
Share on other sites

One detail that I failed to mention is that CsParabola.dll needs to be on a local drive (not run from some server location). I’m not sure, though, if that is the problem or not.

 

The only way to know with certainty is to debug the code with AutoCAD 2007. The only version I have available is 2009.

 

If someone has Visual Studio 2005/2008, along with AutoCAD 2007, and is willing to give the routine some attention, I’ll gladly upload all project files.

Link to post
Share on other sites
khoshravan
One detail that I failed to mention is that CsParabola.dll needs to be on a local drive (not run from some server location). I’m not sure, though, if that is the problem or not.

.

 

I have DL the file to my laptop and opened it. I do not use it from a server location.

 

Rasoul

Link to post
Share on other sites

What does this statement mean exactly?

 

 

It it goes OK, is it necessary to load it each time?

 

The DLL would require loading for each new launch of AutoCAD. The routine would then be accessible to all loaded drawings.

 

.NET DLLs, like ObjectARX routines, can be set up for Demand Load (i.e., loaded the first time the command is called). It does require a change to the system registry on the user’s computer. I haven’t gone that route yet as I suspect that may cross bounds set by IT dept.

Link to post
Share on other sites

Ah yes, that would do it. I’ll look into removing that for a 2007 compatible version and post it when ready.

 

Thanks, gile.

Link to post
Share on other sites
khoshravan

 

It it goes OK, is it necessary to load it each time?

 

Sorry for miss print

 

The correct is:

 

If it goes OK,

Link to post
Share on other sites
  • 10 years later...
joeshardow

Hi, thanks for your sharing. But I cannot right load the plugin into CAD2021 version. After the netload command, there is nothing happened. the command pbb and pvf cannot be found either.

 

 

Link to post
Share on other sites
SEANT
Posted (edited)

I do do not have access to ACAD 2021 version - to know for certain -  but I suspect the routine will work fine.  The first thing I would recommend is UnBlocking the file.  That is a MS Windows requirement for all 'DLLs' originating from outside locations.

Edited by SEANT
Fixed Typo
Link to post
Share on other sites
SEANT

As a side note - this thread goes way far back.  Over 10 years ago.  Back when there wasn't even a dedicated category for .NET automation.  It's location in the AutoLisp forum may seem rather odd.

Link to post
Share on other sites
SLW210
1 hour ago, SEANT said:

As a side note - this thread goes way far back.  Over 10 years ago.  Back when there wasn't even a dedicated category for .NET automation.  It's location in the AutoLisp forum may seem rather odd.

Moved to .NET, ObjectARX & VBA Forum.

Link to post
Share on other sites
joeshardow
Posted (edited)
Quote

I do do not have access to ACAD 2021 version - to now for certain -  but I suspect the routine will work fine.  The first thing I would recommend is UnBlocking the file.  That is a MS Windows requirement for all 'DLLs' originating from outside locations.

Thanks for your kindly reply. I think I didn't block the routine files. I unzip the file and get CsParabola.dll and CsParabola.pdb, and use the netload command to load CsParabola.dll. After run the command of "netload", there is not any message about the load result. Then I try to input the command "pbb" and "pvf", but it seems that there are no such commands. I suppose the netload command didn't succeed, and doesn't know how to deal with it. 

 

Sorry, I am a freshman to advance functions of AutoCAD, maybe this question seems silly. But I really need this routine to get a parabola shape. I would greatly appreciate your help

Edited by joeshardow
add the quote
Link to post
Share on other sites
SEANT
9 hours ago, joeshardow said:

. . . . I think I didn't block the routine files. . . .

 

This statement is confusing.  

 

Ideally what should happen:

 

Download the Zip file

Using 'File Explorer', navigate to downloaded file and Unzip

Navigate to the generated zip generated folder

Right click on the DLL and select 'Properties' in the drop down menu - you should see something like the attached image

Check 'Unblock'

Move the DLL to the folder where your version of the 'acad.exe' resides (Usually something like Program Files - Autodesk - AutoCAD 2021)

In AutoCAD, Netload the DLL from that file location.

UnBlock.jpg

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...