기본 콘텐츠로 건너뛰기

6월, 2013의 게시물 표시

keybd_event

도움글 keyd_event 함수를 통해서 keyboard를 이벤트를 생성할 수 있습니다. 자세한 내용은 위 도움글을 참조하시면 됩니다. void SendKeyIn ( const STRING_T & keyin ) { for ( int nIndex = 0 ; nIndex < int ( keyin . size ( ) ) ; + + nIndex ) { SHORT ch = VkKeyScan ( keyin [ nIndex ] ) ; if ( 1 = = HIBYTE ( ch ) ) { /// shift key press keybd_event ( VK_SHIFT , MapVirtualKey ( VK_SHIFT , 0 ) , 0 , 0 ) ; } keybd_event ( ch , MapVirtualKey ( keyin [ nIndex ] , 0 ) , 0 , 0 ) ; /// 0xE0 keybd_event ( ch , MapVirtualKey ( keyin [ nIndex ] , 0 ) , KEYEVENTF_KEYUP , 0 ) ; if ( 1 = = HIBYTE ( ch ) ) { /// shift key up keybd_event ( VK_SHIFT , MapVirtualKey ( VK_SHIFT , 0 ) , KEYEVENTF_KEYUP , 0 ) ; } } }

마이크로스테이션 V8의 Batch Process를 이용한 PDF 출력

마이크로스테이션 V8 의 Batch Process 를 이용한 Dgn->PDF 출력 첨부한 파일 (Command File) 을 로컬에 복사하세요 . 1.      Utility à Batch Process 를 클릭 2.      PDF 로 출력할 Dgn  파일을 추가 3.      첨부한 Command File 을 선택 4.      Batch Job 실행 5.      PDF 파일은 Adobe Acrobat 에서 설정한 Output Folder 에 생성이 됩니다 . --- Command File -- #---------------------------------------------------------------------- # #  Command file for batchprocess utility # #  This command file was originally copied from $(MS_DATA)cmdfiletemplate.txt. #  Command file information: #       - Lines that start with the '#' character are treated as comments and ignored. # #---------------------------------------------------------------------- fit view extended print attributes lineweights off # 레퍼런스등이 있을 수 있으므로 place fence allfiles 1 print boundary fence plot execute

How do you detect where two line segments intersect?

There’s a nice approach to this problem that uses vector cross products. Define the 2-dimensional vector cross product  v  ×  w  to be  v x w y  −  v y w x  (this is the magnitude of the 3-dimensional cross product). Suppose the two line segments run from  p  to  p  +  r  and from  q  to  q  +  s . Then any point on the first line is representable as  p  +  t   r  (for a scalar parameter  t ) and any point on the second line as  q  +  u   s  (for a scalar parameter  u ). The two lines intersect if we can find  t  and  u  such that: p  +  t   r  =  q  +  u   s Cross both sides with  s , getting ( p  +  t   r ) ×  s  = ( q  +  u   s ) ×  s And since  s  ×  s  =  0 , this means t ( r  ×  s ) = ( q  −  p ) ×  s And therefore, solving for  t : t  = ( q  −  p ) ×  s  / ( r  ×  s ) In the same way, we can solve for  u : u  = ( q  −  p ) ×  r  / ( r  ×  s ) Now if  r  ×  s  =  0  then the two lines are parallel. (There are two cases: if ( q  −  p ) × 

VisualStudio 재배포판 설치여부 확인하기

원문 VC 8.0 Redistributables This function detects if VC++ 8.0 redistributables are installed on the machine ;------------------------------- ; Test if Visual Studio Redistributables 2005+ SP1 installed ; Returns -1 if there is no VC redistributables intstalled Function CheckVCRedist Push $R0 ClearErrors ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{7299052b-02a4-4627-81f2-1818da5d550d}" "Version"  ; if VS 2005+ redist SP1 not installed, install it IfErrors 0 VSRedistInstalled StrCpy $R0 "-1" VSRedistInstalled: Exch $R0 FunctionEnd It should be noted that the DLLs could be installed even if the redistributable isn't installed. One example would be if the user has Visual Studios installed, then they have the dlls without the redist. Newer Visual Studio runtime versions: Visual Studio 2005, x86 SP1: ( 8.0.59193) "{837b34e3-7c30-493c-8f6a-2b0f04e2912c}" Visual Studio 2008, x86 S