View Full Version : drawing temporary lines
2005-01-13, 04:20 AM
Is it possible to draw temporary lines in drawing,through vba (which can
be removed later by redraw/regen)
thanks in advance
2005-01-13, 03:04 PM
VBA doesn't give you the ability to create any new types of lines. What you could do is draw the lines on a certain layer and then redefine redraw and regen commands so that they delete anything on the temp layer.
2005-01-13, 09:03 PM
VBA does not but lisp does. Here is a simple VBA example that calls the grvecs lisp function to draw a line from 0,0 to 1,1. The line will disappear as soon as you Zoom, Redraw, etc.
Public Sub DrawToScreen()
Dim strGRVECS As String
Dim varReturned As Variant
strGRVECS = "(grvecs '(-7 (0 0)(1 1))) "
varReturned = EvalLisp(strGRVECS)
Public Function EvalLisp(strLisp As String) As Variant
Dim objVL As Object
Dim objVLF As Object
Dim objVLO As Object
Set objVL = ThisDrawing.Application.GetInterfaceObject("VL.Application.16")
Set objVLF = objVL.ActiveDocument.Functions
Set objVLO = objVLF.Item("read").funcall(strLisp)
EvalLisp = objVLF.Item("eval").funcall(objVLO)
Regards - Nathan
2005-01-14, 12:51 PM
Hmmm, never thought of temporary lines......can you give an example of what you might want to use TLs for???
2005-01-14, 03:23 PM
I've never had a need to use that lisp command. VBA can draw graphics too. But I was assuming that he needed to use temporary lines for constructing other geometry, snapping, etc. Does grvecs create lines that are snappable? or just graphic? Help doesn't indicate whether or not it can.
2005-01-17, 12:49 AM
I've never had a need to use that lisp command. VBA can draw graphics too. But I was assuming that he needed to use temporary lines for constructing other geometry, snapping, etc. Does grvecs create lines that are snappable? or just graphic? Help doesn't indicate whether or not it can. just a graphic
2005-01-17, 03:19 AM
Oops!it would have been better if I had revealed my intentions in the first place!!..i am trying Out a routine to view revisions from session to session. I need to see only the
Text modifications.the purpose is to draw rectangles around text which are modifiied.
Ofcourse highlighting the entities will work fine. But I feel drawing rectangles around
The text will give more clarity…
Thank u all for showing lot of interest…
2005-01-17, 03:16 PM
If you're doing this for tracking revisions... rather, if I were doing this for tracking revisions, I would create permanent lines, not temporay lines, around the text objects changed and place the newly created boxes on a "REV-01-17-05" layer with the current date displayed in the layer. That way I could really track what has changed by just turning off and on all the REV-Date layers according to date.
Powered by vBulletin® Version 4.1.11 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.