Jump to content

Search the Community

Showing results for tags 'vlax-curve'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Categories

  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 2 results

  1. I have just started learning AutoLISP from different posts on the forums and through the reference material from Autodesk but, I am hitting an error in my lisp routine that I don't know how to fix. I am trying to right a while loop that will go through a nested list and use information in the selected list segment to find points in reference to a Polyline using the vlax-curve-* functions. Currently I am using the vlax-curve-getPointAtDist with a variable distance and using a user defined polyline from the document. My code runs up until the point I try to use the getPointAtDist line which will return the error of "unable to find ObjectID for . The way I get the polyline from the user is a (setq Var (ssget "_+.:s" '((0 . "*POLYLINE")))). I have earlier in the routine the vla-load-com to load in all of the functions of visual lisp. Can anyone help me out on what I need to do to be able to run the vlax-curve-* functions?
  2. Hello All I'm trying to write a vba routine which allows me to get the starting width and length of a polyline shape by specifying three points. The polyline will usually be made up of orthographic straight lines (but not always) Points 1 and 2 are the start and end points of the first side, from which I get the starting width and angle of the first side. Point 3 is a point anywhere on the opposite side. The length of the bay is the perpendicular distance between Point 3 and the first side (a line joining Points 1 & 2). I have written a (crude) LISP routine using vlax-curve-getClosestPointTo, but I now would like to write a vba routine to achieve the same thing. The purpose of the routine is to assist in the production of pre-cast floor layout drawings. The polyline shape would be a bay in a building drawing; the width would provide the pre-cast beam length; the length would provide the length of flooring to fill. Can anybody please help or point me in the right direction? Many thanks ;; dtr - degrees to radians ;; rtd - radians to degrees (defun dtr (a) (* pi (/ a 180.0)) ) (defun rtd (a) (/ (* a 180.0 pi)) ) (defun C:bay (/ pt1 pt2 pt3 pt4) (setq OrigCmdEcho (getvar "CMDECHO")); gets CMDECHO value (setvar "CMDECHO" 0); sets to 0 - wont echo on command line (vl-load-com) (setq pt1 (getpoint "\Enter Point 1 : ")) (setq pt2 (getpoint pt1 "\nEnter point 2 : ")) (setq myline (command "_line" pt1 pt2 ""));draws 1st line (setq mylinename (entlast));obtain entity name of myline (setq pt3 (getpoint pt2 "\nEnter Point 3 : ")); get point on opposite side of rectangle (setq Span (distance pt1 pt2)); sets Span = length of myline (setq ang1 (angle pt1 pt2)); sets ang1 equal to line angle (setq mylinenamevla (vlax-ename->vla-object mylinename)); converts to vla object (setq pt4 (vlax-curve-getClosestPointTo mylinenamevla pt3 T)); gets perpendicular point (setq perpline (command "_line" pt3 pt4 "")); draws perpendicular line (setq perplinename (entlast));obtain entity name of perpline (setq bayl (distance pt3 pt4)); sets bay length to length of perpline (princ "\nSpan is : ")(princ Span) (princ "\nBay length is : ")(princ bayl) (command "_erase" mylinename "") (command "_erase" perplinename "") (setvar "CMDECHO" OrigCmdEcho); puts back to original value (princ) )
×
×
  • Create New...