+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Forum Newbie
    Discipline
    Mechanical
    Using
    AutoCAD 2015
    Join Date
    Jul 2017
    Posts
    9

    Default Recognize multi-object shape

    Registered forum members do not see this ad.

    Hi,

    I converted a pdf file into dwg. In this new file a point has become a group of 2D polyline and not a sigle entity. This conversion is necessary because I have to work in autocad.

    My problem is that I have to search in this dwg all of this "points" and write a text next to. Is possible to write a VBA program for autocad able to do this? If the point was a single point, it wouldn't be a problem, but in this case...I dont' know!

  2. #2
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,819

    Default

    I understand you have 2015 but if you post a dwg we can try a pdf into 2018 and see what we get. Post a sample dwg.
    A man who never made mistakes never made anything

  3. #3
    Forum Newbie
    Discipline
    Mechanical
    Using
    AutoCAD 2015
    Join Date
    Jul 2017
    Posts
    9

    Default

    here is the file http://www.filedropper.com/3points
    As you can see there are 3 points, made by many Polyline2d. My purpose is to write a word next to them every time the code will find this entities in a dwg.

  4. #4
    Forum Newbie
    Discipline
    Mechanical
    Using
    AutoCAD 2015
    Join Date
    Jul 2017
    Posts
    9

    Default

    Consider that my code should find not only "points" but also other kind of these group of polylines (whose boundary shape may be different). So it could be useful if the code, as first step, required to specify the shape to be searched inside the dwg.

  5. #5
    Senior Member
    Using
    AutoCAD 2009
    Join Date
    Oct 2012
    Posts
    293

    Default

    Attach an example file PDF

  6. #6
    Forum Newbie
    Discipline
    Mechanical
    Using
    AutoCAD 2015
    Join Date
    Jul 2017
    Posts
    9

    Default

    The pdf file doesn't matter because the code must work in autocad VBA with the figures that you can see in the file attached. The program must recognize the point (as group of polylines with that shape) and mark/write text like "this is a point"

  7. #7
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,819

    Default

    May have found a way using Lee-mac's Outline.lsp you can create a pline representing the balls, only problem is it is a manual process. You can then get a centroid of this pline which will aproximate the centre.
    Last edited by BIGAL; 28th Jul 2017 at 03:31 am.
    A man who never made mistakes never made anything

  8. #8
    Senior Member
    Using
    AutoCAD 2009
    Join Date
    Oct 2012
    Posts
    293

    Default

    Quote Originally Posted by ElCidCampeador View Post
    The pdf file doesn't matter because the code must work in autocad VBA with the figures that you can see in the file attached. The program must recognize the point (as group of polylines with that shape) and mark/write text like "this is a point"
    Why ?????
    I recommend to watch less news on TV. You will trust people more.
    From the PDF can be imported so that the points were hatching.
    A hatch can be found in the drawing and make the program.
    You incorrectly import PDF.
    Or attach the PDF for checking or mission Impossible.

    And attach an example of how there should be a new text.
    Give all the raw data and an example of the final result.

  9. #9
    Forum Newbie
    Discipline
    Mechanical
    Using
    AutoCAD 2015
    Join Date
    Jul 2017
    Posts
    9

    Default

    Maybe because the pdf file is copyrighted, and I can't share?

    I was thinking of something like Matlab scripts that analize images' pattern/shape, but in visual basic I don't know how to apply it

  10. #10
    Senior Member
    Using
    AutoCAD 2009
    Join Date
    Oct 2012
    Posts
    293

    Default

    Registered forum members do not see this ad.

    You can make your example.
    Here is my example.
    Otherwise, this is incomprehensible.

    There is no initial data, no examples, no example of the final result.
    How can we help you ? We have nothing to work on.
    Attached Files

Similar Threads

  1. lisp to change shape of object
    By Baber62 in forum AutoLISP, Visual LISP & DCL
    Replies: 6
    Last Post: 19th Nov 2015, 12:36 pm
  2. Cutting Shape from Solid Object
    By Landia in forum Rhino
    Replies: 0
    Last Post: 25th Aug 2015, 08:52 pm
  3. check if exist object or shape ?
    By insane in forum AutoLISP, Visual LISP & DCL
    Replies: 13
    Last Post: 26th Dec 2014, 11:20 am
  4. Replies: 4
    Last Post: 21st Jul 2012, 11:36 pm
  5. How to combine two different 2d views to get the right 3d object shape.
    By Robertbrol in forum AutoCAD 3D Modelling & Rendering
    Replies: 1
    Last Post: 10th Feb 2010, 01:19 am

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts