Dominic Posted August 17, 2009 Posted August 17, 2009 Hi In my drawing , one digital signature is attached.I need to get all the details of the signature poragmatically.ie. algorithm, issuer, key, comment etc. Is there any method or property available. If so, please help me. Waiting for your reply Regards Dominic Abraham Quote
Lee Mac Posted August 17, 2009 Posted August 17, 2009 This should point you in the right direction: (defun getSec (/ sec) (vl-load-com) (setq sec (vla-getInterfaceObject (vlax-get-acad-object) (if (< (setq acVer (atoi (getvar "ACADVER"))) 16) "AutoCAD.SecurityParams" (strcat "AutoCAD.SecurityParams." (itoa acVer))))) (vlax-dump-object sec t) (vlax-release-object sec) (princ)) Quote
Dominic Posted August 17, 2009 Author Posted August 17, 2009 Hi .. Thank you for your reply.Is there any VBA scripts or C# code, so that i can easily understand. Regards Dominic Quote
Lee Mac Posted August 17, 2009 Posted August 17, 2009 I'm not so good at VBA... This may help, from the developer help: Sub Example_Algorithm () ' This example encrypts and saves a file. Dim acad As New AcadApplication Dim sp As New AcadSecurityParams acad.Visible = True sp.Action = AcadSecurityParamsType.ACADSECURITYPARAMS_ENCRYPT_DATA sp.Algorithm = AcadSecurityParamsConstants.ACADSECURITYPARAMS_ALGID_RC4 sp.KeyLength = 40 sp.Password = UCase("mypassword") 'AutoCAD converts all passwords to uppercase before applying them sp.ProviderName = "Microsoft Base Cryptographic Provider v1.0" sp.ProviderType = 1 acad.ActiveDocument.SaveAs "C:\MyDrawing.dwg", , sp End Sub Quote
Dominic Posted August 17, 2009 Author Posted August 17, 2009 Hi.. My intention is that, i open and save an autocad file[having signatures attached] programatically. But i don't want to drop the signatures. I need to keep that signatures.I know it is not the right way. But see my scenario. My scenario is like:- [My drawing has 2 or more child drawing, while trying to view the main document, i need to reset the external reference path.i am not making any changes for drawing. So while saving after this, my signature getting invalid. I cant avoid this saving operation while viewing the document.The viewing operation may be doing from the other machine] Is there any solution for this. NB:- I asked the previous question, because i thought that, if i am getting attached signature details, i can attach it again programatically. Please help me to solve this issue:- Quote
Dominic Posted August 19, 2009 Author Posted August 19, 2009 Hi ... No Responses !!!!!!!!!!!!!!!!!!!!!!!:( Regards Dominic Quote
Lee Mac Posted August 19, 2009 Posted August 19, 2009 Dominic, if you don't get a good answer here regarding VBA, try over at TheSwamp.org they have a whole forum dedicated to VBA. Quote
SEANT Posted August 19, 2009 Posted August 19, 2009 Digital signatures are serious business. I suspect that the ability to open a drawing, modify some detail (regardless of how irrelevant it may seem), and then resaving with the previous digital signature intact would be of major concern to some AutoCAD customers; hence, to the AutoCAD developers. I’d guess that it is not possible due to the signatures time stamp (likely used during signature encryption) linked with the OS’s Date Modified stamp. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.