Jump to content

Recommended Posts

Posted
Looks great Buzz. I have a boat load of separate .lsp for HVAC that I need to add into one program (In due time)

 

Looks great! Once I get to work I'll give it a whirl.

 

Thanks

 

Tim,

 

I kind of put this together, I guess in haste. I find that some would prefer to have the code sort of generic and less extras. Not such a big deal to fix. I will be doing more as I go along and get more feed back on it.

 

Thanks

The Buzzard

Posted

Has anyone tried this with 2010? I can't seem to get it to load.

Posted
Has anyone tried this with 2010? I can't seem to get it to load.

jawarren77,

 

Download the latest from the first post. I made a fix to it.

Posted

Also make sure the two files are together and in the ACAD Support Seach Path under Options, File Tab.

Posted

I have both files located where I have my other lisp routines and I did the load application and stored them in the startup suite. And still says file not found.

Posted

great buzzard your Ducting program are working fine. The only problem is on UCS rotated plan you need to add the Trans value.

Posted

Got it working, and Thanks!

Its much easier then doing it from scratch!

Posted
great buzzard your Ducting program are working fine. The only problem is on UCS rotated plan you need to add the Trans value.

 

 

VisDak,

 

I am not sure I am following you about the UCS. Could you please explain?

Posted
Got it working, and Thanks!

Its much easier then doing it from scratch!

jawarren77,

 

Glad you got it working and even better, I am glad you like it. At this time I am working on a combined Metric/Imperial version. Please keep an eye out for it in the near future.

 

 

Enjoy the program,

The Buzzard

Posted
VisDak,

 

I am not sure I am following you about the UCS. Could you please explain?

 

Buzzard,

 

Haven't checked the code, but you will probably need to make use of the "trans" function to account for users using various UCS's.

 

Bear in mind that entmake takes all WCS coords (and converts them to OCS I think - don't quote me on that).

 

Lee

Posted
Buzzard,

 

Haven't checked the code, but you will probably need to make use of the "trans" function to account for users using various UCS's.

 

Bear in mind that entmake takes all WCS coords (and converts them to OCS I think - don't quote me on that).

 

Lee

 

I will look into that. I am not sure at this stage how to go about it.

 

Thanks

Posted
I will look into that. I am not sure at this stage how to go about it.

 

Thanks

 

I'll give you a few pointers, but Gile is the master of the Coordinate systems really :)

 

When prompted for points, the user will pick points in UCS.

 

Entmake requires points relative to WCS so the points in UCS need to be transformed to WCS by use of trans:

 

(trans pt 1 0)

Thats probably the simplest example, the best information can be found here:

 

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

 

And especially here:

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

Posted
I'll give you a few pointers, but Gile is the master of the Coordinate systems really :)

 

When prompted for points, the user will pick points in UCS.

 

Entmake requires points relative to WCS to the points in UCS need to be transformed to WCS by use of trans:

 

(trans pt 1 0)

 

Thats probably the simplest example, the best information can be found here:

 

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

 

And especially here:

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

 

 

So what your saying is, I need to place something like this (trans pt 1 0) at every coordinate point I calculate for an object with entmake?

 

If thats the case, I might as well quit at this point. This is no way that I can figure all that into my code.

I should have stuck with command calls, Then I would not have all this time wasted.

 

Sorry Lee,

I am done

Posted

No, you just need to convert the original point selected by the user - the rest, I assume, are calculated from this point.

Posted
I should have stuck with command calls, Then I would not have all this time

 

You would have to do the same with command calls I believe.

Posted
You would have to do the same with command calls I believe.

 

Something is not making any sense here. Out of all programs I have seen to date that create an object in either method, I never once saw this used in any example or programs made here.

 

How all of a sudden does this just popup out of the blue that it is needed. My program seems to draw the objects selected without a hassle in model space. I am not building a 3D program here so why is this that important?.

 

I do not get it.

Posted
Something is not making any sense here. Out of all programs I have seen to date that create an object in either method, I never once saw this used in any example or programs made here.

 

How all of a sudden does this just popup out of the blue that it is needed. My program seems to draw the objects selected without a hassle in model space. I am not building a 3D program here so why is this that important?.

 

I do not get it.

 

Try changing your UCS, then draw the object and you will see the effect.

 

PS> the ucs is not just for 3D stuff.

Posted
Try changing your UCS, then draw the object and you will see the effect.

 

PS> the ucs is not just for 3D stuff.

That still does not answer my question.

I have not seen this function on any similar programing example here or any where else. This function seems to now be so important. The code will be useless without it from the impression I get. I have seen folks make codes for making objects and never used this in those codes. Is this some special purpose thing?

 

This is what I have in the program for selecting points.

I placed the code in there and did notice anything different about the way it makes the object.

 

      (cond
       ((= DCOM$ "HDUCT")
       (setq CL01# (getpoint "\nSpecify duct starting point: ")
             CL02# (getpoint CL01# "\nSpecify duct ending point: "))))
     (if (or (= DCOM$ "VDUCT")(= DCOM$ "RADIUS")(= DCOM$ "MITERED")(= DCOM$ "CAP")(= DCOM$ "TAKE-OFF")(= DCOM$ "FCON"))
       (progn
         (setq CL01# (getpoint "\nSpecify duct/fitting insertion point: ")
               CL02# (getpoint CL01# "\nDrag cursor and pick a point for insertion angle."))))
     (cond
       ((= DCOM$ "TRANSITION")
       (setq CL01# (getpoint "\nSpecify transition insertion point: ")
             CL02# (getpoint CL01# "\nDrag cursor and pick a point for insertion angle."))))
     (setvar "osmode" 0)
     (trans CL01# 1 0)
     (trans CL02# 1 0)
     (cond
       ((= DCOM$ "HDUCT")     (RMD_HDUCT))
       ((= DCOM$ "VDUCT")     (RMD_VDUCT))
       ((= DCOM$ "RADIUS")    (RMD_RADIUS))
       ((= DCOM$ "MITERED")   (RMD_MITERED))
       ((= DCOM$ "TRANSITION")(RMD_TRANSITION))
       ((= DCOM$ "CAP")       (RMD_CAP))
       ((= DCOM$ "TAKE-OFF")  (RMD_TAKE-OFF))
       ((= DCOM$ "FCON")      (RMD_FCON))
       ((= DCOM$ "DAMPER")    (RMD_DAMPER)))
     (RMD_PL)))
 (princ))

Posted
That still does not answer my question.

I have not seen this function on any similar programing example here or any where else. This function seems to now be so important. The code will be useless without it from the impression I get. I have seen folks make codes for making objects and never used this in those codes. Is this some special purpose thing?

 

You will not see it used on short programs (these will only work in WCS) and most do not know how to use it - but certainly on larger programs you will see it used.

 

Take a look at a few of my programs in the Archive such as:

 

http://www.cadtutor.net/forum/showthread.php?t=42426

 

to see an example.

 

This is what I have in the program for selecting points.

I placed the code in there and did notice anything different about the way it makes the object.

 

Did you change the UCS when testing?

Posted

An example for you to try:

 

(defun c:test (/ line pt1 pt2)

 (defun line (p1 p2 c)
   (entmake (list (cons 0 "LINE")
                  (cons 10 p1) (cons 11 p2) (cons 62 c))))

 (command "_.ucs" "")
 (command "_.ucs" "_z" 45)

 (if (and (setq pt1 (getpoint "\nPick Point 1: "))
          (setq pt2 (getpoint "\nPick Point 2: " pt1)))
   
   (progn 
     (line pt1 pt2 1) ;; RED
     (line (trans pt1 1 0) (trans pt2 1 0) 3))) ;; GREEN

 (princ))

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...