+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Full Member
    Computer Details
    rodrigo_sjc_sp's Computer Details
    Operating System:
    Windows 7 (32bits) - Version 6.1 - Comp. 7601 SP1
    Computer:
    DELL
    CPU:
    Pentium(R) Dual-Core CPU E5300 @2.6GHz
    RAM:
    2,00 GB
    Graphics:
    1440 x 900
    Primary Storage:
    148GB
    Monitor:
    LG
    Discipline
    See details...
    rodrigo_sjc_sp's Discipline Details
    Occupation
    Analyst programmer
    Discipline
    See details below.
    Details
    Analyst programmer
    Using
    AutoCAD 2011
    Join Date
    Oct 2012
    Location
    São Paulo - Brazil
    Posts
    96

    Default Select Polyline with variable ?

    Registered forum members do not see this ad.

    I need select a Polyline with a variable,

    This code is ok!
    (setq selpline (ssget "_x" '((0 . "LWPOLYLINE")(8 . "First"))))


    I need convert to:
    (setq cod "Second")
    (setq selpline (ssget "_x" '((0 . "LWPOLYLINE")(8 . cod))))



    But this code return
    Command: ; error: bad SSGET list value


    I need help to make this code.

    Thanks
    Rodrigo

  2. #2
    Forum Deity Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draftsman
    Discipline
    Mechanical
    Using
    AutoCAD 2014
    Join Date
    Oct 2009
    Location
    Lives in Abu Dhabi
    Posts
    2,627

    Default

    The name of the layer should be string like the first line of code you brought .

    Code:
    (8 . "cod")
    - When aim is being settled in my mind , I have to reach it and get it in hand whatever it costs and wherever it is and will never give up . Tharwat said

  3. #3
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,718
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

  4. #4
    Full Member
    Computer Details
    rodrigo_sjc_sp's Computer Details
    Operating System:
    Windows 7 (32bits) - Version 6.1 - Comp. 7601 SP1
    Computer:
    DELL
    CPU:
    Pentium(R) Dual-Core CPU E5300 @2.6GHz
    RAM:
    2,00 GB
    Graphics:
    1440 x 900
    Primary Storage:
    148GB
    Monitor:
    LG
    Discipline
    See details...
    rodrigo_sjc_sp's Discipline Details
    Occupation
    Analyst programmer
    Discipline
    See details below.
    Details
    Analyst programmer
    Using
    AutoCAD 2011
    Join Date
    Oct 2012
    Location
    São Paulo - Brazil
    Posts
    96

    Default thank you!

    thank you ! =)

  5. #5
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,718

    Default

    You're welcome!
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

  6. #6
    Full Member
    Computer Details
    rodrigo_sjc_sp's Computer Details
    Operating System:
    Windows 7 (32bits) - Version 6.1 - Comp. 7601 SP1
    Computer:
    DELL
    CPU:
    Pentium(R) Dual-Core CPU E5300 @2.6GHz
    RAM:
    2,00 GB
    Graphics:
    1440 x 900
    Primary Storage:
    148GB
    Monitor:
    LG
    Discipline
    See details...
    rodrigo_sjc_sp's Discipline Details
    Occupation
    Analyst programmer
    Discipline
    See details below.
    Details
    Analyst programmer
    Using
    AutoCAD 2011
    Join Date
    Oct 2012
    Location
    São Paulo - Brazil
    Posts
    96

    Default error

    if i use

    (setq valor "X1")
    (setq selpline (ssget "_x" '((0 . "LWPOLYLINE")(8 . "valor"))))

    The lisp does not recognize the value of the variable
    If use variable with "" the lisp recognize VALOR and not X1

    Any help?

  7. #7
    Forum Deity Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draftsman
    Discipline
    Mechanical
    Using
    AutoCAD 2014
    Join Date
    Oct 2009
    Location
    Lives in Abu Dhabi
    Posts
    2,627

    Default

    Quote Originally Posted by rodrigo_sjc_sp View Post
    if i use

    (setq valor "X1")
    (setq selpline (ssget "_x" '((0 . "LWPOLYLINE")(8 . "valor"))))

    The lisp does not recognize the value of the variable
    If use variable with "" the lisp recognize VALOR and not X1

    Any help?
    Hola .

    It should like this .

    Code:
    (setq valor "X1")
    (setq selpline (ssget "_x" (list '(0 . "LWPOLYLINE")(cons 8 valor))))
    - When aim is being settled in my mind , I have to reach it and get it in hand whatever it costs and wherever it is and will never give up . Tharwat said

  8. #8
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,718

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by rodrigo_sjc_sp View Post
    if i use

    (setq valor "X1")
    (setq selpline (ssget "_x" '((0 . "LWPOLYLINE")(8 . "valor"))))

    The lisp does not recognize the value of the variable
    If use variable with "" the lisp recognize VALOR and not X1

    Any help?
    Did you read the post I linked to?
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

Similar Threads

  1. Select one line of a Polyline
    By guitarguy1685 in forum AutoLISP, Visual LISP & DCL
    Replies: 2
    Last Post: 13th Jul 2011, 09:01 pm
  2. select polyline
    By neunew in forum AutoLISP, Visual LISP & DCL
    Replies: 0
    Last Post: 24th May 2010, 03:09 pm
  3. select inside of a polyline
    By flopo in forum AutoLISP, Visual LISP & DCL
    Replies: 6
    Last Post: 3rd Feb 2010, 12:13 pm
  4. select a polyline
    By Huibert in forum AutoLISP, Visual LISP & DCL
    Replies: 2
    Last Post: 8th Oct 2008, 03:33 pm
  5. Select SubEntity in Polyline
    By krugler in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 19th Apr 2006, 09:51 pm

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