Jump to content

Recommended Posts

Posted (edited)

I created lots of simple sweep objects with a circle and a singel line path. later on I want to count all this 'pipes' and list their lengths.

But I can't figure out how to get the "Sweep length: 128.98" information [as in the list command] in a variable in Lisp.

Can someone help me out and tell me what [Visual]Lisp functions must I include to get this sweep length?

 

I know that Extrude and the Heigth would suffice too, but I do not know how to get this info either. Yet in this case I do not use Extrude.

Edited by Bernie
Posted

I keep my sweep paths on a "centerline" layer and use tlen.lsp to measure pipe runs. Did you keep your paths?

Posted
I keep my sweep paths on a "centerline" layer and use tlen.lsp to measure pipe runs. Did you keep your paths?

Thank you Nestly, I know how to obtain the lengths of lines. That could be an option, but it is not 'fool proof', as it is possible to change the SWEEP length (by hand), yet forget to change the 'centerline', the paths. I need to have a trustworthy list of the Pipes. Therefor my question is as it is.

In a Line object you can simply determine the length by (distance 'p10' 'p11'), but what trick is there to get the length of a SWEEP object?

Posted

That 3dSolid property has yet to be exposed directly by Autodesk to one of the Lisp compatible APIs.

 

Is there any upfront knowledge about the profile - i.e., could the length be found by dividing the volume by the profile area? That would probably work well for solids (straight or curved) if they still exist as SWEEPs. If the Solid has undergone Boolean operations then the process would be more difficult.

 

As similar topic (initially associated with VBA, but applicable to VisualLisp) was discussed here:

http://www.cadtutor.net/forum/showthread.php?37494

 

Many more 3DSolid properties are available to ObjectARX. If the techniques described above are not up to the task perhaps you could test the code posted here (may need to register to view page).

http://www.theswamp.org/index.php?topic=39278.msg445148

Posted

Thank you Seant,

I am sorry to say that I know hardly anything about VBA and reading the code did not help me much to tackle the problem.

The swamp-link is usefull, (i am a mosquito now) and the program offered in the link appears to be great, yet does not load in Autocad and I replied [at the swamp] to see what might be the case.

So I am still stuck with my question.

Posted

I may have been too abrupt with my suggestions; I’m assuming a more arbitrary setup than may be expected.

 

 

 

Post some sample geometry. That should illustrate the problem more clearly, and perhaps allow for simplified solutions.

Posted

Sample with Sweep object.dwg

This is a smal part of the drawing. I need to count different sets of sweeps and blocks and put them in a list, a table. For the blocks it is no problem, but I want to present the pipes (sweep) in the same way. Diameter and length.

 

Now i started a different approach, as I understood yesterday that Autodesk may deliberatly 'block' information retrieval.

So I take each sweep, start an undo group, explode sweep until I have 2 facing circles, get the distance and radius from these, undo 1, and I got my info, while drawing is unchanged.

It's not a neat way, but it works a bit.

Yet I prefer to find a nicer way, is this kind of problem surfaced more often and I never before found a way out. (I lack the knowledge)

Posted

Now i started a different approach, as I understood yesterday that Autodesk may deliberatly 'block' information retrieval.

 

Recent API enhancements to the ARX APIs have quelled that suspicion.

 

 

 

 

Would every Sweep on layer WL5421--_D use the same 6.35outside diameter?

Posted
Would every Sweep on layer WL5421--_D use the same 6.35outside diameter?

 

No, there is a list of sizes I match the diameter with... (member e2_Diam (list 6.35 9.53 12.7 19.05 25.4 38.1 50.8 63.5 76.2 101.6)) These are mm conversions of inches. starting 1/4" to 4".

And there are many many layers... but that's

But just now I noticed that the "gc-brep" function in the 'swamp' example works, I needed to unblock the dll, they (Gile) told me.

I'll go and see what this "gc-brep" can do for me. I will post the outcome.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...