Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Today
  3. Hello I Want to know Why in some cases my *view center point ( GP 12 of AcDbViewport) is not equal to my center point of my VP at WCS? { can *view target point (GP 17) Affect that ? (if Yes how can i change it) } thanks.
  4. Hmm... More pieces of the puzzle? When I am on the Model tab, I can select objects and pan without losing them. It's when I'm on one of the layout tabs that I lose my selections when I pan. Also, I can zoom in and out in the layout tabs and I don't lose the selected objects. ??
  5. Tharwat

    HVAC 3rd Release

    I have just published the new release of the HVAC 4.5.0 program with more additions of fittings, options and new presentation that should amaze you for sure. https://autolispprograms.wordpress.com/.../hvac-application/
  6. You can explode the circles until you have two half-circles. Those have two points, left and right. Export those points to csv and open with excel. After that use formula to calculate the avarage coordinate from each first two set of X and Y (as seen in image). Remove the spaces in between and make a new point file. Import that file in CAD and check if it is the center, and you're done. P.s. this will mess up your work if there are individual single points in the export that are not part of the half circle Image: https://ibb.co/kctR1xs
  7. Thank you... Have been searching for this...
  8. when u convert an object to a viewport it will convert the object to a viewport on whatever layer is currently selected. So i always change the current layer to be the viewport layer, then do the conversion. If you have something like layer zero as current, the viewport will inherit those layer properties when u do the conversion (if that makes sense). Which may not be what you want. -ChriS
  9. 1st you need to change the ssget for volumes to include the layer filter. (if (and (setq ss (ssget '((0 . "3DSOLID")))) (setq lay (cdr (assoc 8 (entget (car (entsel "\nSelect object for layer")))))) (if (and (setq ss (ssget (list '(0 . "3DSOLID")(cons 8 lay)))) MM to m vol (setq vol (* vol 1e-06)) (setq p (getpoint "\nTable scale depend on annotation scale.\nSpecify table insert point: ")) ht (/ 2.5 (cond ((getvar 'cannoscalevalue)) (1.0))) ht 25 ; some ht value that you want
  10. Yesterday
  11. If you wrote the code then you should be able to work out what is wrong or did some one else do it ? It looks like some forms are being called. Ok 1 need image showing what is wrong. 2 need xls with macro in it. Again I am no expert in VBA.
  12. Perhaps simplest is get co-ords of 3dpoly, take average of z, then make a new normal pline but with ELEV set at the Z value THICKNESS can be height of building. If you want a top look into "pface" ; this works for 3dpoly and bricscad ; co-ords by by lee-mac ; 3dpoly to 2dpoly with thickness ; by Alanh Sep 2020 (defun c:test ( / e lst v x tot x z) (while (setq e (car (entsel "\nSelect polyline: "))) (if (= "POLYLINE" (cdr (assoc 0 (setq x (entget e))))) (progn (setq lst '()) (setq v (entnext e) x (entget v) ) (while (= "VERTEX" (cdr (assoc 0 x))) (setq lst (cons (cdr (assoc 10 x)) lst) v (entnext v) x (entget v) ) ) (setq tot 0.0 x (length lst)) (repeat (length lst) (setq tot (+ (nth 2 (nth (setq x (- x 1)) lst)) tot)) ) (setvar 'thickness (getreal "\nEnter building height ")) (entmakex (append (list (cons 0 "LWPOLYLINE") (cons 100 "AcDbEntity") (cons 100 "AcDbPolyline") (cons 90 (length lst)) (cons 70 1)) (mapcar (function (lambda (p) (cons 10 p))) lst))) (setq z (atof (rtos (length lst) 2 3))) (command "move" "last" "" "0,0,0" (list 0 0 (/ tot z))) (setvar 'thickness 0.0) ) (princ "\nThe selected object is not a 2d or 3D polyline.") ) ) (princ) ) (c:test)
  13. Hi tolgydd . For better understanding, and maybe get further help, please upload such sample.dwg
  14. Cad64

    Tapered ellipse

    I don't know anything about paintshop pro, but you might want to take a look at these tutorials for setting up a postscript plotter and then plotting to .eps format, provided paintshop can open .eps files? https://www.cadtutor.net/tutorials/autocad/postscript-plotter.php https://www.cadtutor.net/tutorials/autocad/autocad-to-photoshop.php
  15. On this day in the year 2020, Autodesk joined the Open Design Alliance (ODA). Autodesk Senior Vice President of Design and Creation Products, Amy Bunszel, made the announcement today via this press release. Amy says “Those of you who know the history between Autodesk and the ODA will understand the importance we put on getting this functionality to our customers at an accelerated pace.” and “Our decision to join ODA is one of the many steps we are taking to continue fostering an open community and strengthen our partnerships across the industry.” “ODA welcomes Autodesk as its newest member,” said Neil Peterson, ODA President. What will this mean for Autodesk customers and the industry in general? Stay tuned. View the full article
  16. I don't use a template per se. I update the drawing on a weekly basis and just save the drawing with the new date. So February 11 I could select and pan, February 18 I lose the selections.
  17. Berzerker

    Tapered ellipse

    Bad thing is I had to change it to a BMP to erase the background and make it transparent. Hope it lets me save it back as a raster image later. Using paint shop pro 8. I want to print a sticker to put on the bottom but as I said it doesn't print good as a BMP. I can't use white as the background color of the sticker because the bones are white and they would be invisible when printed.
  18. Cad64

    Tapered ellipse

    Yes, Bmp is the worst image format. Tiff is the highest quality, but also the largest file size. Jpg is "Ok" quality and small file size. It's a good file format for posting online. Png is great quality with a reasonable file size. I typically save images to Png format, but for posting on the forum, I save to Jpg format. The reason your Tiff image was rejected is that it probably exceeds the image size limit for the forum. Save to Jpg and you shouldn't have any issues.
  19. I don't have access to Mechanical, so I can't experiment on my end or diagnose your drawing. If it's only happening on newer drawings, I would check my template first. Assuming you use a template.
  20. Berzerker

    Tapered ellipse

    Soon as you posted that I went looking up 3D printer services. I haven't had time to go through them all yet and check out prices and not trying saying anything bad about my friend it might be a better option than trial and error/learning on his part. He hasn't had it that long and "IS" still learning how to print with no errors. But it is free! I'll read this thanks. I found out there is a difference in output types (BMP, PNG, JPEG and TIFF etc. I tried a few of them and seen a big difference right off the bat. Lets see if this looks better on the forum: Nope, wouldn't let me post a TIFF pic.
  21. Thanks for your reply CyberAngel. I should have started with saying that I'm working with AutoCAD 2014 Mechanical. The SELECTIONOFFSCREEN isn't included in 2014. The QAFLAGS was initially at 16. I've changed it to 0 through 16 with no change in losing the selected objects. I am trying to turn on and/or turn off different system variables but no luck yet.
  22. Cad64

    Tapered ellipse

    Take a look at this link. There's some good information for older versions of Autocad: http://www.dscohn.com/AU/handouts/GD115-2 Rendering part 2-DOC.pdf
  23. it would be cleaner and faster to use COND instead of all those IF's https://www.afralisp.net/autolisp/tutorials/cond-vs-if.php as for finding the longer side. maybe something like this. (vlax-invoke-method (vlax-ename->vla-object obj) 'getboundingbox 'minpt 'maxpt) (setq pt1 (trans (vlax-safearray->list minpt) 0 obj)) (setq pt2 (trans (vlax-safearray->list maxpt) 0 obj)) (setq x (- (car pt2) (car pt1))) (setq y (- (cadr pt2) (cadr pt1))) (if (> x Y) (command "-INSERT" "TSD" Pt "200" "50" "0") (command "-INSERT" "TSD" Pt "50" "200" "0") ) not tested to busy today. --- also in the BricsCAD Boat!
  24. steven-g

    Tapered ellipse

    See if there is anything close here https://wiki.hackerspaces.org/Alabama providing they are still running looks to be some old address's there
  25. Berzerker

    Tapered ellipse

    Alabama steven-g. No I live about 25 to 30 miles outside my city limits. I don't think there's a place like that close to where I'm at, at least not that I'm aware of. When you live in the country it's great, 15 acres and few neighbors but there are draw backs. I will get one eventually.
  26. steven-g

    Tapered ellipse

    Isn't there a 'makerspace' or something similar near you, I've been to a few and they don't charge a fortune to let you use the 3d printers. And they are usually really happy to have people present. Where are yoiu in the world?
  27. I’ll admit it. I just love AutoLISP, and I consider it my “home” language. But I also understand that my love of the language isn’t universal. You may not consider yourself a programmer, or it might just be intimidating. It really doesn’t have to be, and even with just minimal knowledge, you can still accomplish a lot. This three-part series will help you become aware of the kinds of things you can do with AutoLISP at three levels of expertise: Beginner, Intermediate, and Advanced. Right now, we’ll start at the very beginning. What a Beginner Should Know I think it’s important for any AutoLISP user to know what it is. LISP stands for LISt Processing. That’s your first clue. Everything in the language is a list in some form. You’ll need to know about them, whether they’re defined as a LIST, a CONS, a DOTTED PAIR, or an S-EXPRESSION (or just EXPRESSION for short). Of course, there are various data types you’ll need to be familiar with. AutoLISP considers a LIST or a CONS as a data type. Others include STRINGS, REAL numbers, and INTEGERS. Note: One of the reasons AutoLISP is so easy for non-programmers (people like us) is that you don’t have to manage data types and memory allocation like other languages. There’s no need to compile your code either. In fact, the interpreter is built into AutoCAD, so you can run expressions right from the Command Line. As for basic Terminology and Syntax, you should know that items within a list are ATOMS. The functions that AutoLISP uses are called…FUNCTIONS—that’s easy! And FUNCTIONS sometimes require ARGUMENTS. Those are the ATOMS that follow the Function call in the expression. Syntax can be defined as the rules that any kind of language uses. The basic rules of AutoLISP are that everything is contained within a set of parentheses. Next, is that the function is always the first item (or ATOM) in a list. (functionName argument1 argument2 …) Note: It’s important to note here that every Expression returns a value. That’s an important point, as it sets AutoLISP apart from other languages that are considered “Procedural” languages. In the simplest terms, those languages execute a line of code, move on to the next, and so forth until complete. Without going into a dissertation on “Functional” languages, just remember that while we may tend to use AutoLISP in a procedural manner within a CAD program, it is much more powerful than that. You should be aware that expressions can be nested, and that you evaluate them from the inside out. (functionName argument1 (functionName argument1 argument2) argument3 …) A beginner should be aware of internal AutoLISP functions, especially DEFUN and SETQ. Others may include: AutoLISP specific functions: COMMAND, GETVAR, SETVAR AutoLISP specific “GET…” functions: GETSTRING, GETREAL, etc. Basic list manipulation functions: LIST, CONS, CAR, CDR, NTH Basic conditional functions: IF, COND Equality functions: = /= < > EQ EQUAL Math Functions: + – / etc. What else should a beginner know? You should know how to load external AutoLISP files (LOAD, APPLOAD, Drag and Drop), and how to identify the Function name needed to run them at the Command Line. Finally, you should know how to get help. Whether via AutoCAD’s own Help system or various sites and forums on the internet and Autodesk Knowledge Network, don’t hesitate to reach out. There’s some 35 years of experience and code out there, and someone is always willing to help. That may appear to be a lot of stuff to know, but a little goes a long way with AutoLISP. Which leads us to the next section… Ways a Beginner Can Use AutoLISP To Automate Tasks With just a basic level of AutoLISP knowledge, you should be able to do the following things. Control your AutoCAD environment. Make sure your OSNAP settings are always set the way you like them by using (setvar “OSMODE” 679). 679 equates to the running osnaps I like. Not sure what your favorites add up to? Use (getvar “OSMODE”). No longer do you need to open the Object Snap dialog and check and uncheck boxes. You’ve just automated it! Almost any environment variable you can think of can be set this way. You can create your own keyboard short commands. You probably are aware of the limitations of the Command Aliases found in the ACAD.pgp file. You can alias the command name, but you can’t include any options. For example, Z is for Zoom. But you still have to enter E to get Extents. With just a little AutoLISP knowledge a beginner should be able write their own custom ZE command: (defun c:ze () (command “zoom” “e”) (princ) ) Do you find yourself using Move Previous often? Automate it! (defun c:mp () (command “move” “p”) (princ) ) We’re always talking about keeping your drawings clean. Purge and Audit, we tell you. Get rid of unused REGAPPS, and also run Overkill. Why not use your new AutoLISP knowledge to automate this sequence? You should have all the tools you need to write something like the following: (defun c:cleaner () (command “audit” “Y”) (command “-purge” “a” “” “n”) (command “-purge” “r” “” “n”) (command “-overkill” “all” “” “”) (princ) ) Note: Two things from the above code. The call to (princ) at the end suppresses the functions returned value of nil on the command line. Also, the dash in front of the Purge and Overkill command calls suppresses the command’s dialog box and uses the command line version instead. Lots of other commands do this. Experiment…make or set your layers with -Layer. Just follow the prompts on the command line, and you’re on your way. The last two examples make new commands. SSA sets the SNAPANG variable based on a selected line. Below it, SS0 resets it to zero. On the right, TOGGLEDITOR changes MTEXTED from the internal editor to Notepad, and back again. I presented these as an image to force you to type them, should you want. Copy and paste is handy, but you have to be able to type them as well. Also, don’t use MS Word, as it adds special formatting. Notepad works fine. Finally, an AutoLISP beginner should know how to add their custom command to their menu. Make your own Ribbon tab and panel or add it to an old-fashioned toolbar button for easy access. Final Thoughts In part two of our series, I’ll discuss some of the AutoLISP functionality you’ll need to know to become what I would call an Intermediate level, and what kinds of things you can do with those skills. And finally, to quote my original AutoLISP mentor from way back in the day, “until next time, keep on programmin’.” The post AutoLISP to Automate Your Tasks: Part 1 – Beginner appeared first on AutoCAD Blog. View the full article
  28. Berzerker

    Tapered ellipse

    I could change the first two but SKYSTATUS and LIGHTINGUNITS said "unknown command". Turned my screen gray/grey depending on where you live. Opened the sunproperties and yeah, I need to do some more reading. I can't get my logo to look right no matter what I do (?) One way it takes out my cross bones the other way I can't see the skull at all. I made this awhile back and I'm still working on it but when I BMP it out it comes out fussy and looks bad, it doesn't print good/right and it's driving me crazy trying to figure it out. I wish I had a 3D printer boy could I move forward! My friend is still doing his two week thing and I won't be able to tell to print me another one till he gets back.
  1. Load more activity
  • Newsletter

    Want to keep up to date with all our latest news and information?
    Sign Up
×
×
  • Create New...