The Buzzard Posted February 8, 2010 Author Posted February 8, 2010 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 Quote
jawarren77 Posted February 8, 2010 Posted February 8, 2010 Has anyone tried this with 2010? I can't seem to get it to load. Quote
The Buzzard Posted February 8, 2010 Author Posted February 8, 2010 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. Quote
The Buzzard Posted February 8, 2010 Author Posted February 8, 2010 Also make sure the two files are together and in the ACAD Support Seach Path under Options, File Tab. Quote
jawarren77 Posted February 8, 2010 Posted February 8, 2010 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. Quote
VisDak Posted February 8, 2010 Posted February 8, 2010 great buzzard your Ducting program are working fine. The only problem is on UCS rotated plan you need to add the Trans value. Quote
jawarren77 Posted February 8, 2010 Posted February 8, 2010 Got it working, and Thanks! Its much easier then doing it from scratch! Quote
The Buzzard Posted February 8, 2010 Author Posted February 8, 2010 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? Quote
The Buzzard Posted February 8, 2010 Author Posted February 8, 2010 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 Quote
Lee Mac Posted February 8, 2010 Posted February 8, 2010 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 Quote
The Buzzard Posted February 8, 2010 Author Posted February 8, 2010 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 Quote
Lee Mac Posted February 8, 2010 Posted February 8, 2010 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 Quote
The Buzzard Posted February 8, 2010 Author Posted February 8, 2010 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 Quote
Lee Mac Posted February 8, 2010 Posted February 8, 2010 No, you just need to convert the original point selected by the user - the rest, I assume, are calculated from this point. Quote
Lee Mac Posted February 8, 2010 Posted February 8, 2010 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. Quote
The Buzzard Posted February 8, 2010 Author Posted February 8, 2010 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. Quote
Lee Mac Posted February 8, 2010 Posted February 8, 2010 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. Quote
The Buzzard Posted February 8, 2010 Author Posted February 8, 2010 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)) Quote
Lee Mac Posted February 8, 2010 Posted February 8, 2010 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? Quote
Lee Mac Posted February 8, 2010 Posted February 8, 2010 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)) Quote
Recommended Posts
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.