Results 1 to 2 of 2

Thread: Function Call w/ Arguements Not working Please help!

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2014-04
    Posts
    1
    Login to Give a bone
    0

    Exclamation Function Call w/ Arguements Not working Please help!

    Here is my section of code that I need help on. The error VisualLISP is giving me is :Function Canceled. The builder doesn't complain, so my syntax is correct, but its just not working. I am making simple lines and changing the color to them using the "change" command with a function call. Can anyone please tell me what I am doing wrong??

    Code:
    (defun color (col)
        (command "change" col "" "P" "C" "T" "255,0,0" "")
    )
    
    (defun c:wellplace ()
    (color po2)  ;po2 is a "point number 2" that is calculated else in the code.
    )
    Shouldn't it take the po2 which is a polar point, consisting of x,y,z coordinates and pass it along to the "color function"?
    I am doing this, because I need to do the "change" command a good 8 times, and i don't want 8 of duplicate lines of the same thing.

    Also if i go with not defining a function and just inputting the "change" command right into the body of my code, it works perfect, and replace 'col' with 'po2' so what gives?

  2. #2
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: Function Call w/ Arguements Not working Please help!

    You are saying PO2 is supposed to be a coordinate? It may not be picking any objects at that coordinate. Have you thought about passing the entity or entities as an argument?
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

Similar Threads

  1. 2015: Transparency function not working
    By paudy86 in forum Revit Architecture - General
    Replies: 1
    Last Post: 2015-06-22, 08:15 AM
  2. 2012: AUTOCAD 2012 PASTE FUNCTION NOT WORKING
    By tmccotter in forum AutoCAD General
    Replies: 3
    Last Post: 2014-06-23, 03:55 PM
  3. Pure Virtual Function Call Error R6025
    By sheila.bjerreskov in forum AMEP General
    Replies: 4
    Last Post: 2009-10-19, 04:32 PM
  4. Calculate function not working in B.O.M. Generator
    By Poorest Chump in forum AutoLISP
    Replies: 6
    Last Post: 2005-05-11, 09:58 PM

Tags for this Thread

Posting Permissions

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