几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


回复
 
主题工具 搜索本主题 显示模式
旧 2009-05-07, 12:04 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】query regarding model and layout view

query regarding model and layout view

query regarding model and layout view
hi all,
i have a drawing which is opened in acad 2000. in acad 2000, there are 2 view: 1. model view, and layout view.
i have tested this drawing in odamfcapp example, there when i turn off all the layers except $polyline_sp, i am getting a bounded rectangle. i have implemented a functionality for getting the handles of the polyline when the mouse is clicked inside a polyline. but due to this border, i cant perform the check. why is it so..?
when i open the drawing in acad 200 and when i switch it to model view, there seems to be no border..
i need to know how this can be achieved. (only viewing model view).. so that i can perform the select operation..
tia
thanks & regards,
rajesh parameswaran

rajuinnet
# 30th october 2004, 01:42 am

registered user join date: jul 2004
location: india
posts: 82

oddbpolyline::getpointat()
oddbpolyline::getpointat()
hi all,
i found that the oddbpolyline::getpointat() seems to be giving wrong coordinates...
i need to get all the coordinates for a oddbpolyline entity, for performing the point in polyline...
help needed..!!
tia
thanks & regards,
rajesh parameswaran

rajuinnet
# 30th october 2004, 01:55 am

registered user join date: jul 2004
location: india
posts: 82

opening drawing in model space
hi all,
i found that the drawing file is opening in paper space. can i know how to open a drawing and view it in model space .?
in the odamfcapp also, the drawing is opening in paper space..
tia
thanks & regards,
rajesh parameswaran

rajuinnet
# 1st november 2004, 01:08 am

softdev join date: jun 2002
location: st'petersburg, russia
posts: 522

odamfcapp has command "set active layout" (view/set active layout). it is implemented by function codamfcappdoc:nviewsetactivelayout (file odamfcappdoc.cpp). this is a sample of setting active layout (it uses method oddbdatabase::setcurrentlayout).
also there are methods oddbdatabase::findactivelayout() and oddbdatabase::gettilemode(), which can help with getting active layout. oddbdatabase::gettilemode() returns true if model space is active.
sincerely yours,
george udov

george udov
# 1st november 2004, 03:56 am

registered user join date: jul 2004
location: india
posts: 82

hi george,
i found that when a drawing is opened in model space, we use the getactiveview(), like the below one.
odgsview* ctest1view::getactiveview()
{
return m_pdevice->viewat(0);
}
but when a drawing is opened in paper space, then the above function, is modified as
odgsview* ctest1view::getactiveview()
{
return m_pdevice->viewat(1);
}
then i'm getting the model space.
i can see the paper space entities, even when i open a drawing (saved in the paper space view). i don't want to see the paper space entities.'
help needed..!! to open drawing and display only model space entities, even if the entities are saved in paper space view..
tia
thanks & regards,
rajesh parameswaran

rajuinnet
# 1st november 2004, 04:15 am

registered user join date: jul 2004
location: india
posts: 82

hi george,
i found a solution for the view port problem, can u tell me whether i am doing in the right way..
here is the code snippet from the file open function..
try
{
theapp.m_pdb = theapp.readfile(filenameue, 0 );
if (!theapp.m_pdb->gettilemode())
{
theapp.m_pdb->setcurrentlayout("model");
}
}
catch (oderror& err)
{
str = theapp.geterrordescription(err.code()).c_str();
messagebox(str);
return;
}
catch(...)
{
messagebox ("unknown error");
return;
}
tia
thanks & regards,
rajesh parameswaran

rajuinnet
# 1st november 2004, 11:34 pm

softdev join date: jun 2002
location: st'petersburg, russia
posts: 522

you're going in the right way.
sincerely yours,
george udov

george udov
# 2nd november 2004, 02:36 am

registered user join date: jul 2004
location: india
posts: 82

quote:
originally posted by george udov
you're going in the right way.
hi george,
thank you for your reply..
thanks & regards,
rajesh parameswaran

rajuinnet

none
? | ?
thread tools



display modes
linear mode


search this thread

rate this thread
excellent
good
average
bad
terrible

posting rules
you may post new threads
you may post replies
you may post attachments
you may edit your posts
is on
are on
code is off
html code is off
forum jump
user control panel private messages subscriptions who's online search forums forums home general topics news questions and remarks business issues industry commentary general software issues documentation issues future directions dwg libraries dwgdirect.net dwgdirect, c++ version dwgdirectx, activex version adtdirect/c3ddirect opendwg toolkit/viewkit dgn libraries dgndirect, c++ version (2.x+) dgndirect libraries (legacy 0.99xx)
all times are gmt -7. the time now is 12:45 amfff">.
- - -
copyright ?2000 - 2009, jelsoft enterprises ltd.
copyright 1998-2008 open design alliance inc.

oddbpolyline::getpointat()
oddbpolyline::getpointat()
hi all,
i found that the oddbpolyline::getpointat() seems to be giving wrong coordinates...
i need to get all the coordinates for a oddbpolyline entity, for performing the point in polyline...
help needed..!!
tia
thanks & regards,
rajesh parameswaran

opening drawing in model space
hi all,
i found that the drawing file is opening in paper space. can i know how to open a drawing and view it in model space .?
in the odamfcapp also, the drawing is opening in paper space..
tia
thanks & regards,
rajesh parameswaran

odamfcapp has command "set active layout" (view/set active layout). it is implemented by function codamfcappdoc:nviewsetactivelayout (file odamfcappdoc.cpp). this is a sample of setting active layout (it uses method oddbdatabase::setcurrentlayout).
also there are methods oddbdatabase::findactivelayout() and oddbdatabase::gettilemode(), which can help with getting active layout. oddbdatabase::gettilemode() returns true if model space is active.
sincerely yours,
george udov

hi george,
i found that when a drawing is opened in model space, we use the getactiveview(), like the below one.
odgsview* ctest1view::getactiveview()
{
return m_pdevice->viewat(0);
}
but when a drawing is opened in paper space, then the above function, is modified as
odgsview* ctest1view::getactiveview()
{
return m_pdevice->viewat(1);
}
then i'm getting the model space.
i can see the paper space entities, even when i open a drawing (saved in the paper space view). i don't want to see the paper space entities.'
help needed..!! to open drawing and display only model space entities, even if the entities are saved in paper space view..
tia
thanks & regards,
rajesh parameswaran

hi george,
i found a solution for the view port problem, can u tell me whether i am doing in the right way..
here is the code snippet from the file open function..
try
{
theapp.m_pdb = theapp.readfile(filenameue, 0 );
if (!theapp.m_pdb->gettilemode())
{
theapp.m_pdb->setcurrentlayout("model");
}
}
catch (oderror& err)
{
str = theapp.geterrordescription(err.code()).c_str();
messagebox(str);
return;
}
catch(...)
{
messagebox ("unknown error");
return;
}
tia
thanks & regards,
rajesh parameswaran

you're going in the right way.
sincerely yours,
george udov

quote:
originally posted by george udov
you're going in the right way.
hi george,
thank you for your reply..
thanks & regards,
rajesh parameswaran
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】problem with layout and viewpor yang686526 DirectDWG 0 2009-05-06 11:21 PM
【转帖】paper model space yang686526 DirectDWG 0 2009-05-06 09:37 PM
【转帖】no lineweights on bmp-expor yang686526 DirectDWG 0 2009-05-06 06:34 PM
【转帖】named view locations yang686526 DirectDWG 0 2009-05-06 06:19 PM
【转帖】initial model space view settings yang686526 DirectDWG 0 2009-05-06 03:54 PM


所有的时间均为北京时间。 现在的时间是 11:02 AM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多