Code Red > AutoLISP (Vanilla / Visual)

Dynamic Block Angle Property

(1/3) > >>

surveyor_randy:
Could someone tell me how I can access the Custom property "Angle" in a dynamic block.  Not the block rotation, but the angle of a rotation action.  I am trying to design some lisp that will allow my dynamic north arrow to sync with the twist angle of a selected viewport.   Any information you provide would be greatly appreciated.  Thanks!

Jeff_M:
You need to use the GetDynamicBlockProperties method of the DB, then cycle through the returned object(s), checking the PropertyName value,  until you get the property you want to read/set.

ronjonp:
Maybe some of this code can help you:

http://www.theswamp.org/index.php?topic=21164.msg256839#msg256839

Here is a routine I put together to insert north arrows at the same rotation as the twist angle of the pspace viewport.

http://www.theswamp.org/index.php?topic=19285.msg234429#msg234429

surveyor_randy:

--- Quote from: Jeff_M on April 21, 2008, 04:29:52 PM ---You need to use the GetDynamicBlockProperties method of the DB, then cycle through the returned object(s), checking the PropertyName value,  until you get the property you want to read/set.


--- End quote ---

Hi Jeff!

Thanks for the reply, I looked through the help file and the functions and didn't see any 'GetDynamicBlockProperties' functions.  Then I went to Autodesks website and searched and found that it is 'vla-getdynamicblockproperties' and it seems that you have to use it in combination with safearray and variant... hmmm...  strangely like VBA!  :-)

Where can I find more documentation on the 'vla' based commands, since I didn't see it in the 'V' section of the functions help file.  I really appreciate your time and input!  I am fairly strong in VBA and am picking up lisp fairly quickly thanks to everyone at The Swamp.  Thanks again everyone!

surveyor_randy:

--- Quote from: ronjonp on April 21, 2008, 05:28:05 PM ---Maybe some of this code can help you:

http://www.theswamp.org/index.php?topic=21164.msg256839#msg256839

Here is a routine I put together to insert north arrows at the same rotation as the twist angle of the pspace viewport.

http://www.theswamp.org/index.php?topic=19285.msg234429#msg234429

--- End quote ---

Wow!  Very nice code!  I am still learning lisp and your sample code will be a great study for me!  I can't believe how powerful Lisp really is.  I've spent all this time in VB and had no idea.  Great code and thanks for sharing it with us!  :-)

PS - I hope you don't mind if I borrow this code temporarily for work!

Navigation

[0] Message Index

[#] Next page

Go to full version