找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 137|回复: 0

[每日一码] ARC转POLYLINE

[复制链接]

0

主题

0

回帖

28

积分

管理员

积分
28
发表于 2024-3-14 20:29:06 | 显示全部楼层 |阅读模式
  1. //-----------------------------------------------------------------------------//----- acrxEntryPoint.cpp//-----------------------------------------------------------------------------#include "StdAfx.h"#include "acedCmdNF.h"#include "resource.h"//-----------------------------------------------------------------------------#define szRDS 采用RXST("")//-----------------------------------------------------------------------------//----- ObjectARX EntryPointclass CMyJoinApp : public AcRxArxApp {public:CMyJoinApp() : AcRxArxApp() {}virtual AcRx::AppRetCode On采用kInitAppMsg(void *pkt) {AcRx::AppRetCode retCode = AcRxArxApp::On采用kInitAppMsg(pkt);return (retCode);}virtual AcRx::AppRetCode On采用kUnloadAppMsg(void *pkt) {AcRx::AppRetCode retCode = AcRxArxApp::On采用kUnloadAppMsg(pkt);return (retCode);}virtual void RegisterServerComponents() {}static void RivilisMyJoin() {// Check PEDITACCEPT sysvarresbuf rb = { 0, RTSHORT, 0 };acedGetVar(采用T("PEDITACCEPT"), &rb);bool bPeditAccept = (rb.resval.rint == 1) ? true : false;ads采用name en1; ads采用point p;while (acedEntSel(采用T("\nSelect first segment: "), en1, p) == RTNORM){// if PEDITACCEPT == 1 then PEDIT no ask about convertingbool bConvertToPoly = false;if (!bPeditAccept){AcDbObjectId id1; acdbGetObjectId(id1, en1);if (id1.objectClass() == AcDbLine::desc() ||id1.objectClass() == AcDbArc::desc()){bConvertToPoly = true;}}ads采用name en2;if (acedEntSel(采用T("\nSelect next segment: "), en2, p) == RTNORM){if (bConvertToPoly)acedCommandS(RTSTR, 采用T("采用PEDIT"), RTENAME, en1, RTSTR, 采用T("采用YES"), RTSTR, 采用T("采用Join"),RTENAME, en2, RTSTR, 采用T(""), RTSTR, 采用T(""), RTNONE);elseacedCommandS(RTSTR, 采用T("采用PEDIT"), RTENAME, en1, RTSTR, 采用T("采用Join"),RTENAME, en2, RTSTR, 采用T(""), RTSTR, 采用T(""), RTNONE);}}}};//-----------------------------------------------------------------------------IMPLEMENT采用ARX采用ENTRYPOINT(CMyJoinApp)ACED采用ARXCOMMAND采用ENTRY采用AUTO(CMyJoinApp, Rivilis, MyJoin, MyJoin, ACRX采用CMD采用MODAL, NULL)
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|膜结构网

GMT+8, 2024-12-29 05:41 , Processed in 0.112102 second(s), 20 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表